summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/general_purpose
AgeCommit message (Collapse)Author
2018-03-14x86: Replace the .serializing directive with .serialize_(before|after).Gabe Black
This makes it explicit which type of serialization you want, and also makes it possible to make a macroop serialize before. The old serializing directive was renamed .serialize_after in the microcode assembler, and throughout the microcode implementation, and its behavior is unchanged. More specifically, it still marks the last microop within the macroop as IsSerializing and IsSerializeAfter. The new .serialize_before directive does something similar and marks the first microop as IsSerializing and IsSerializeBefore. Change-Id: Ia53466c734c651c65400809de7ef903c4a6c3e7e Reviewed-on: https://gem5-review.googlesource.com/9041 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-01-23arch-x86: Adding clflush, clflushopt, clwb instructionsSwapnil Haria
This patch adds support for cache flushing instructions in x86. It piggybacks on support for similar instructions in arm ISA added by Nikos Nikoleris. I have tested each instruction using microbenchmarks. Change-Id: I72b6b8dc30c236a21eff7958fa231f0663532d7d Reviewed-on: https://gem5-review.googlesource.com/7401 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-12-14x86: Use operand size 4 when it would be 2 for cmpxchg8b.Gabe Black
This means the instruction is treated as cmpxchg8b when the effective operand size is 16 bits. Change-Id: I4d9bb295f96097e1746a9bbccb2c579d14738fab Reviewed-on: https://gem5-review.googlesource.com/6603 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-12-05x86: LOOP's operand size defaults to 64 bits in 64 bit mode.Gabe Black
The microcode for those instructions needs a directive which overrides that setting in the instructions emulation environment. Reported-by: Matt Sinclair <mattdsinclair@gmail.com> Change-Id: I474d938c0b3cf01da92ec817a58b08de783f1967 Reviewed-on: https://gem5-review.googlesource.com/6301 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-02-10x86: Fix implicit stack addressing in 64-bit modeJason Lowe-Power
When in 64-bit mode, if the stack is accessed implicitly by an instruction the alternate address prefix should be ignored if present. This patch adds an extra flag to the ldstop which signifies when the address override should be ignored. Then, for all of the affected instructions, this patch adds two options to the ld and st opcode to use the current stack addressing mode for all addresses and to ignore the AddressSizeFlagBit. Finally, this patch updates the x86 TLB to not truncate the address if it is in 64-bit mode and the IgnoreAddrSizeFlagBit is set. This fixes a problem when calling __libc_start_main with a binary that is linked with a recent version of ld. This version of ld uses the address override prefix (0x67) on the call instruction instead of a nop. Note: This has not been tested in compatibility mode and only the call instruction with the address override prefix has been tested. See [1] page 9 (pdf page 45) For instructions that are affected see [1] page 519 (pdf page 555). [1] http://support.amd.com/TechDocs/24594.pdf Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2016-02-06x86: revamp cmpxchg8b/cmpxchg16b implementationAlexandru Dutu
The previous implementation did a pair of nested RMW operations, which isn't compatible with the way that locked RMW operations are implemented in the cache models. It was convenient though in that it didn't require any new micro-ops, and supported cmpxchg16b using 64-bit memory ops. It also worked in AtomicSimpleCPU where atomicity was guaranteed by the core and not by the memory system. It did not work with timing CPU models though. This new implementation defines new 'split' load and store micro-ops which allow a single memory operation to use a pair of registers as the source or destination, then uses a single ldsplit/stsplit RMW pair to implement cmpxchg. This patch requires support for 128-bit memory accesses in the ISA (added via a separate patch) to support cmpxchg16b.
2016-02-06style: remove trailing whitespaceSteve Reinhardt
Result of running 'hg m5style --skip-all --fix-white -a'.
2015-07-20x86: x86 instruction-implementation bug fixesDavid Hashe
Added explicit data sizes and an opcode type for correct execution.
2014-11-17x86: Fix setting segment bases in real mode.Gabe Black
The data size used for actually writing the base value for the segment was the default size, but really it should set the entire value without any possible truncation.
2014-11-17x86: Fix some bugs in the real mode far jmp instruction.Gabe Black
The far pointer should be shifted right to get the selector value, not left. Also, when calculating the width of the offset, the wrong register was used in one spot.
2014-10-16arch: Use shared_ptr for all FaultsAndreas Hansson
This patch takes quite a large step in transitioning from the ad-hoc RefCountingPtr to the c++11 shared_ptr by adopting its use for all Faults. There are no changes in behaviour, and the code modifications are mostly just replacing "new" with "make_shared".
2013-11-26x86: Implementation of Int3 and Int_Ib in long modeChristian Menard
This is an implementation of the x86 int3 and int immediate instructions for long mode according to 'AMD64 Programmers Manual Volume 3'.
2013-05-21x86: mark instructions for being function call/returnNilay Vaish
Currently call and return instructions are marked as IsCall and IsReturn. Thus, the branch predictor does not use RAS for these instructions. Similarly, the number of function calls that took place is recorded as 0. This patch marks these instructions as they should be.
2013-04-23x86: increment the stack pointer in lret instChristian Menard
The 'lret' instruction reloads instruction pointer and code segment from the stack and then pops them. But the popping part is missing from the current implementation. This caused incorrect behavior in some code related to the Fiasco OS. Microops are being added to rectify the behavior of the instruction. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2012-04-29X86: Fix the IMUL_R_P_I macroop.Gabe Black
The disp displacement was left off the load microop so the wrong value was used.
2012-01-09X86: Add memory fence to I/O instructionsNilay Vaish
2011-11-03x86: Add microop for fenceNilay Vaish
This patch adds a new microop for memory barrier. The microop itself does nothing, but since it is marked as a memory barrier, the O3 CPU should flush all the pending loads and stores before the fence to the memory system.
2011-03-01X86: Mark IO reads and writes as non-speculative.Gabe Black
2011-02-07X86: Use all 64 bits of the lstar register in the SYSCALL_64 macroop.Tim Harris
During SYSCALL_64, use dataSize=8 when handling new rip (ref http://www.intel.com/Assets/PDF/manual/253668.pdf 5.8.8 IA32_LSTAR is a 64-bit address)
2011-02-07X86: Fix JMP_FAR_I to unpack a far pointer correctly.Tim Harris
JMP_FAR_I was unpacking its far pointer operand using sll instead of srl like it should, and also putting the components in the wrong registers for use by other microcode.
2011-02-07X86: Read the LDT/GDT at CPL0 when executing an iret.Tim Harris
During iret access LDT/GDT at CPL0 rather than after transition to user mode (if I'm reading the Intel IA-64 architecture spec correctly, the contents of the descriptor table are read before the CPL is updated).
2011-02-02X86: Replace the stupd microop with a store/update sequence.Gabe Black
2010-09-29X86: Fix the RIP relative versions of the BT, BTC, BTR, and BTS instructions.Gabe Black
2010-08-23X86: Mark serializing macroops and regular instructions as such.Gabe Black
2010-07-21Fix x86 XCHG macro-op to use locked micro-ops for all memory accessesTushar Krishna
2010-05-23copyright: Change HP copyright on x86 code to be more friendlyNathan Binkert
2009-11-10X86: Fix bugs in movd implementation.Vince Weaver
Unfortunately my implementation of the movd instruction had two bugs. In one case, when moving a 32-bit value into an xmm register, the lower half of the xmm register was not zero extended. The other case is that xmm was used instead of xmmlm as the source for a register move. My test case didn't notice this at first as it moved xmm0 to eax, which both have the same register number.
2009-10-30X86: Implement movd_Vo_Edp on X86Vince Weaver
This patch implements the movd_Vo_Edp series of instructions. It addresses various concerns by Gabe Black about which file the instruction belonged in, as well as supporting REX prefixed instructions properly. This instruction is needed for some of the spec2k benchmarks, most notably bzip2.
2009-09-16X86: Fix checking the NT bit during an IRET.Gabe Black
2009-08-17X86: Implement MOVNTI.Gabe Black
2009-08-17X86: Turn the DIV and IDIV microcode into templates and generate all the ↵Gabe Black
variants.
2009-08-17X86: Remove some FIXMEs from IDIV that have been fixed.Gabe Black
2009-08-17X86: Turn the CMPXCHG8B microcode into a template and generate each variant.Gabe Black
2009-08-17X86: Fix a bug introduced to IDIV in a recent attempt to fix another bug.Gabe Black
2009-08-09X86: Implement the CMPXCHG8B/CMPXCHG16B instruction.Gabe Black
2009-08-09X86: Don't clobber the original dividend when doing signed divide.Gabe Black
2009-08-08X86: Make not taken conditional moves leave the destination alone. Adjust ↵Gabe Black
CMOVcc. The manuals from both AMD and Intel say that when writing to a 32 bit destination in 64 bit mode, the upper 32 bits of the register are filled with zeros. They also both say that the CMOV instructions leave their destination alone when their condition fails. Unfortunately, it seems that CMOV will zero extend its destination register whether or not it was supposed to actually do a move on both platforms. This seems to be the only case where this happens, but it would be hard to say for sure.
2009-08-07X86: (Re)Implemented SHRD.Gabe Black
2009-08-07X86: Implement SHLD.Gabe Black
2009-08-07X86: Make the qaud width bswap instruction handle the fact that 32 bit ↵Gabe Black
operations zero extend.
2009-08-07X86: Don't truncate the immediate parameter for the ENTER instruction.Gabe Black
2009-08-06X86: Adjust the various sizes used for the enter and leave instructions.Gabe Black
2009-08-06X86: Make scas compare its operands in the right order.Gabe Black
2009-08-06X86: Fix a copy/paste error for cmovnp.Gabe Black
2009-08-05X86: Fix condition code setting for signed multiplies with negative results.Gabe Black
2009-08-05X86: Use the new forced folding mechanism for the SAHF and LAHF instructions.Gabe Black
2009-08-05X86: Fix the indexing for ah in byte division instructions.Gabe Black
2009-08-05X86: Fix the indexing for ah in byte multiply instructions.Gabe Black
2009-08-05X86: Set the flags on rotate left with carry instructions.Gabe Black
2009-08-05X86: Set the flags for rotate right with carry instructions.Gabe Black