History log of /gem5/src/arch/x86/isa/decoder/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
14289:49005710b522 26-Aug-2019 Pouya Fotouhi <Pouya.Fotouhi@amd.com>

arch-x86: ignore non-temporal hint for movntps/movntpd SSE insts

Making the implementation of movntps/movntpd consistent with other
non-temporal instructions. We are ignoring the hint here, and
implementing those instructions as cacheable instructions.

This change adds a warning to let user know about this workaround.
Also, this change add the address check for second part of move.

Change-Id: I811652b24cf39ca2f5c5d4c9e9e417f69190b55c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20408
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>

14224:2edf6ec03c9d 26-Aug-2019 Pouya Fotouhi <Pouya.Fotouhi@amd.com>

arch-x86: Adding warning for movnti

We are ignoring the non-temporal hint here, and implementing this
instruction as a cacheable instruction.

This change adds a warning to let user know about this workaround.

Change-Id: I2e40437a44282fe9cf7772a25a8870bd8729a6ed
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20428
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

14220:d8f83e601091 20-Aug-2019 Pouya Fotouhi <Pouya.Fotouhi@amd.com>

arch-x86: implement movntq/movntdq instructions

Non-temporal quadword/double-quadword move instructions.
This change ignores the non-temporal hint and instructions are
implemented to send cacheable request to memory.
This would have some "performance" impact (i.e. having some cache
pollution) to get better "correctness" in behavior.

Change-Id: I2052ac0970f61a54bafb7332762debcb7103202d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20288
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

14164:9683bde0d48a 14-Aug-2019 Gabe Black <gabeblack@google.com>

x86: Make unsuccessful CPUID instructions zero the result.

The previous implementation left the registers unmodified which is
technically correct since there is no defined behavior in that case or
a fault to raise. That would make what happened when the following code
consumed the result unpredictable because it would depend on what junk
values were left in the registers. This was originally not a problem
since the space of supported functions were tightly packed, but someone
added a new function with a gap without adjusting this behavior.

This change makes CPUID zero out RAX, RBX, RCX, and RDX when it fails.
That should be more predictable and cause less flakey failures.

Change-Id: If6ffb17c2969d34aff1600c0ffc32333d0b9be44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20168
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>

12683:6e14a1dd346d 20-Apr-2017 Steve Reinhardt <steve.reinhardt@amd.com>

arch-x86: implement movntps/movntpd SSE insts

These are non-temporal packed SSE stores.

Change-Id: I526cd6551b38d6d35010bc6173f23d017106b466
Reviewed-on: https://gem5-review.googlesource.com/9861
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

12586:ab24f7edc1e3 12-Mar-2018 Gabe Black <gabeblack@google.com>

x86: Implement the RDTSCP instruction.

This is very similar to RDTSC, except that it requires all younger
instructions to retire before it completes, and it writes the TSC_AUX
MSR into ECX. I've added an mfence as an iniitial microop to ensure
that memory accesses complete before RDTSCP runs, and added an rdval
microop at the end to read the TSC_AUX value into ECX.

Change-Id: I9766af562b7fd0c22e331b56e06e8818a9e268c9
Reviewed-on: https://gem5-review.googlesource.com/9043
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

12463:84f365522633 15-Jan-2018 Swapnil Haria <swapnilster@gmail.com>

arch-x86: Adding clflush, clflushopt, clwb instructions

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>

12205:f29b67179a96 26-Sep-2017 Bjoern A. Zeeb <baz21@cam.ac.uk>

arch-x86: fix CondInst decoding for MOV to Control Registers

MOV Rd,Cd is MR encoded but the control register is operand 2
not operand 1 hence this needs to be MODRM_REG not MODRM_RM.
While MOV Cd,Rd is RM encoded registers are also swapped, so
it also needs to be MODRM_REG as well (as it already correctly is).

This fixes incorrect UD2 reportings leading to invalid traps
reported in O3 on X86 FS introduced with 4e939a7 .

Change-Id: Ib33c8ba87b00e0264d33da44fff64ed9e4d2d9d8
Reviewed-on: https://gem5-review.googlesource.com/4861
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

12170:efbf270e389d 24-Aug-2017 Gabe Black <gabeblack@google.com>

x86: Use the new CondInst format for moves to/from control registers.

The condition is whether the control register index is valid.

Change-Id: I8a225fcfd4955032b5bbf7d3392ee5bcc7d6bc64
Reviewed-on: https://gem5-review.googlesource.com/4581
Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

12045:31d9a81ba286 24-May-2017 Gabe Black <gabeblack@google.com>

x86: Rework how VEX prefixes are decoded.

Remove redundant information from the ExtMachInst, hash the vex
information to ensure the decode cache works properly, print the vex info
when printing an ExtMachInst, consider the vex info when comparing two
ExtMachInsts, fold the info from the vex prefixes into existing settings,
remove redundant decode code, handle vex prefixes one byte at a time and
don't bother building up the entire prefix, and let instructions that care
about vex use it in their implementation, instead of developing an entire
parallel decode tree.

This also eliminates the error prone vex immediate decode table which was
incomplete and would result in an out of bounds access for incorrectly
encoded instructions or when the CPU was mispeculating, as it was (as far
as I can tell) redundant with the tables that already existed for two and
three byte opcodes. There were differences, but I think those may have
been mistakes based on the documentation I found.

Also, in 32 bit mode, the VEX prefixes might actually be LDS or LES
instructions which are still legal in that mode. A valid VEX prefix would
look like an LDS/LES with an otherwise invalid modrm encoding, so use that
as a signal to abort processing the VEX and turn the instruction into an
LES/LDS as appropriate.

Change-Id: Icb367eaaa35590692df1c98862f315da4c139f5c
Reviewed-on: https://gem5-review.googlesource.com/3501
Reviewed-by: Joe Gross <joe.gross@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

11877:5ea85692a53e 20-Jul-2015 Brandon Potter <brandon.potter@amd.com>

syscall_emul: [patch 13/22] add system call retry capability

This changeset adds functionality that allows system calls to retry without
affecting thread context state such as the program counter or register values
for the associated thread context (when system calls return with a retry
fault).

This functionality is needed to solve problems with blocking system calls
in multi-process or multi-threaded simulations where information is passed
between processes/threads. Blocking system calls can cause deadlock because
the simulator itself is single threaded. There is only a single thread
servicing the event queue which can cause deadlock if the thread hits a
blocking system call instruction.

To illustrate the problem, consider two processes using the producer/consumer
sharing model. The processes can use file descriptors and the read and write
calls to pass information to one another. If the consumer calls the blocking
read system call before the producer has produced anything, the call will
block the event queue (while executing the system call instruction) and
deadlock the simulation.

The solution implemented in this changeset is to recognize that the system
calls will block and then generate a special retry fault. The fault will
be sent back up through the function call chain until it is exposed to the
cpu model's pipeline where the fault becomes visible. The fault will trigger
the cpu model to replay the instruction at a future tick where the call has
a chance to succeed without actually going into a blocking state.

In subsequent patches, we recognize that a syscall will block by calling a
non-blocking poll (from inside the system call implementation) and checking
for events. When events show up during the poll, it signifies that the call
would not have blocked and the syscall is allowed to proceed (calling an
underlying host system call if necessary). If no events are returned from the
poll, we generate the fault and try the instruction for the thread context
at a distant tick. Note that retrying every tick is not efficient.

As an aside, the simulator has some multi-threading support for the event
queue, but it is not used by default and needs work. Even if the event queue
was completely multi-threaded, meaning that there is a hardware thread on
the host servicing a single simulator thread contexts with a 1:1 mapping
between them, it's still possible to run into deadlock due to the event queue
barriers on quantum boundaries. The solution of replaying at a later tick
is the simplest solution and solves the problem generally.

11703:08b78e0a3717 26-Oct-2016 Michael LeBeane <michael.lebeane@amd.com>

dev: Add m5 op to toggle synchronization for dist-gem5.
This patch adds the ability for an application to request dist-gem5 to begin/
end synchronization using an m5 op. When toggling on sync, all nodes agree
on the next sync point based on the maximum of all nodes' ticks. CPUs are
suspended until the sync point to avoid sending network messages until sync has
been enabled. Toggling off sync acts like a global execution barrier, where
all CPUs are disabled until every node reaches the toggle off point. This
avoids tricky situations such as one node hitting a toggle off followed by a
toggle on before the other nodes hit the first toggle off.

11289:ab19693da8c9 07-Jan-2016 Gabor Dozsa <gabor.dozsa@arm.com>

pseudo inst,util: Add optional key to initparam pseudo instruction

The key parameter can be used to read out various config parameters from
within the simulated software.

11160:10f28b61fcb1 06-Oct-2015 Steve Reinhardt <steve.reinhardt@amd.com>

x86: implement rcpps and rcpss SSE insts

These are packed single-precision approximate reciprocal operations,
vector and scalar versions, respectively.

This code was basically developed by copying the code for
sqrtps and sqrtss. The mrcp micro-op was simplified relative to
msqrt since there are no double-precision versions of this operation.

11159:9459593cb649 06-Oct-2015 Steve Reinhardt <steve.reinhardt@amd.com>

x86: implement fild, fucomi, and fucomip x87 insts

fild loads an integer value into the x87 top of stack register.
fucomi/fucomip compare two x87 register values (the latter
also doing a stack pop).
These instructions are used by some versions of GNU libstdc++.

10959:30c700ee0d47 20-Jul-2015 David Hashe <david.hashe@amd.com>

x86: x86 instruction-implementation bug fixes

Added explicit data sizes and an opcode type for correct execution.

10924:d02e9c239892 17-Jul-2015 Nilay Vaish <nilay@cs.wisc.edu>

x86: decode instructions with vex prefix

This patch updates the x86 decoder so that it can decode instructions with vex
prefix. It also updates the isa with opcodes from vex opcode maps 1, 2 and 3.
Note that none of the instructions have been implemented yet. The
implementations would be provided in due course of time.

10784:2f1a0f6d5d77 13-Apr-2015 Nilay Vaish <nilay@cs.wisc.edu>

x86: implements x87 mult/div instructions

10632:b415e0dabe21 03-Jan-2015 Maxime Martinasso <maxime.cscs@gmail.com>

x86: implements the simd128 ADDSUBPD instruction

This patch implements the simd128 ADDSUBPD instruction for the x86 architecture.

Tested with a simple program in assembly language which executes the
instruction. Checked that different versions of the instruction are executed
by using the execution tracing option.

Committed by: Nilay Vaish <nilay@cs.wisc.edu

10593:a39de7b8d2c9 04-Dec-2014 Gabe Black <gabeblack@google.com>

x86: Rework opcode parsing to support 3 byte opcodes properly.

Instead of counting the number of opcode bytes in an instruction and recording
each byte before the actual opcode, we can represent the path we took to get to
the actual opcode byte by using a type code. That has a couple of advantages.
First, we can disambiguate the properties of opcodes of the same length which
have different properties. Second, it reduces the amount of data stored in an
ExtMachInst, making them slightly easier/faster to create and process. This
also adds some flexibility as far as how different types of opcodes are
handled, which might come in handy if we decide to support VEX or XOP
instructions.

This change also adds tables to support properly decoding 3 byte opcodes.
Before we would fall off the end of some arrays, on top of the ambiguity
described above.

This change doesn't measureably affect performance on the twolf benchmark.

10529:05b5a6cf3521 06-Nov-2014 Marc Orr <morr@cs.wisc.edu>

x86 isa: This patch attempts an implementation at mwait.

Mwait works as follows:
1. A cpu monitors an address of interest (monitor instruction)
2. A cpu calls mwait - this loads the cache line into that cpu's cache.
3. The cpu goes to sleep.
4. When another processor requests write permission for the line, it is
evicted from the sleeping cpu's cache. This eviction is forwarded to the
sleeping cpu, which then wakes up.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

10341:0b4d10f53c2d 03-Sep-2014 Mitch Hayenga <mitch.hayenga@arm.com>

x86: Flag instructions that call suspend as IsQuiesce

The o3 cpu relies upon instructions that suspend a thread context being
flagged as "IsQuiesce". If they are not, unpredictable behavior can occur.
This patch fixes that for the x86 ISA.

10044:42e058cae3d0 27-Jan-2014 Nilay Vaish <nilay@cs.wisc.edu>

x86: implements x87 add/sub instructions

10043:301f2c0b3423 27-Jan-2014 Nilay Vaish <nilay@cs.wisc.edu>

x86: implements fxch instruction.

9985:d70124a5d594 26-Nov-2013 Christian Menard <christian.menard@tu-dresden.de>

x86: Implementation of Int3 and Int_Ib in long mode

This is an implementation of the x86 int3 and int immediate
instructions for long mode according to 'AMD64 Programmers Manual
Volume 3'.

9896:e31776cf4743 29-Sep-2013 Andreas Sandberg <andreas@sandberg.pp.se>

x86: Add support for FXSAVE, FXSAVE64, FXRSTOR, and FXRSTOR64

9895:a1f661af9dc9 29-Sep-2013 Andreas Sandberg <andreas@sandberg.pp.se>

x86: Add support for FLDENV & FNSTENV

9894:c0a3920859bd 29-Sep-2013 Andreas Sandberg <andreas@sandberg.pp.se>

x86: Add support for loading 32-bit and 80-bit floats in the x87

The x87 FPU supports three floating point formats: 32-bit, 64-bit, and
80-bit floats. The current gem5 implementation supports 32-bit and
64-bit floats, but only works correctly for 64-bit floats. This
changeset fixes the 32-bit float handling by correctly loading and
rounding (using truncation) 32-bit floats instead of simply truncating
the bit pattern.

80-bit floats are loaded by first loading the 80-bits of the float to
two temporary integer registers. A micro-op (cvtint_fp80) then
converts the contents of the two integer registers to the internal FP
representation (double). Similarly, when storing an 80-bit float,
there are two conversion routines (ctvfp80h_int and cvtfp80l_int) that
convert an internal FP register to 80-bit and stores the upper 64-bits
or lower 32-bits to an integer register, which is the written to
memory using normal integer stores.

9582:0632d2d1575c 11-Mar-2013 Nilay Vaish <nilay@cs.wisc.edu>

x86: implement some of the x87 instructions
This patch implements ftan, fprem, fyl2x, fld* floating-point instructions.

9557:8666e81607a6 19-Feb-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Fix warnings issued by clang 3.2svn (XCode 4.6)

This patch fixes the warnings that clang3.2svn emit due to the "-Wall"
flag. There is one case of an uninitialised value in the ARM neon ISA
description, and then a whole range of unused private fields that are
pruned.

9472:8a2175fa7fa0 15-Jan-2013 Nilay Vaish <nilay@cs.wisc.edu>

x86: implements fsin, fcos instructions

9471:4193ed60eed7 15-Jan-2013 Nilay Vaish <nilay@cs.wisc.edu>

x86: implements emms instruction

9470:68f7e0bcf4aa 15-Jan-2013 Nilay Vaish <nilay@cs.wisc.edu>

x86: implement fabs, fchs instructions

9457:a4739b6f799d 08-Jan-2013 LluĂ­s Vilanova <vilanova@ac.upc.edu>

util: add m5_fail op.

Used as a command in full-system scripts helps the user ensure the benchmarks have finished successfully.

For example, one can use:

/path/to/benchmark args || /sbin/m5 fail 1

and thus ensure gem5 will exit with an error if the benchmark fails.

9372:7ba317c33683 30-Dec-2012 Nilay Vaish <nilay@cs.wisc.edu>

x86: implement x87 fp instruction fnstsw
This patch implements the fnstsw instruction. The code was originally written
by Vince Weaver. Gabe had made some comments about the code, but those were
never addressed. This patch addresses those comments.

9371:7c1484cc9b10 30-Dec-2012 Nilay Vaish <nilay@cs.wisc.edu>

x86: implement x87 fp instruction fsincos
This patch implements the fsincos instruction. The code was originally written
by Vince Weaver. Gabe had made some comments about the code, but those were
never addressed. This patch addresses those comments.

9038:d7ddf3266d46 04-Jun-2012 Gabe Black <gblack@eecs.umich.edu>

X86: Ensure that the CPUID instruction always writes its outputs.

The CPUID instruction was implemented so that it would only write its results
if the instruction was successful. This works fine on the simple CPU where
unwritten registers retain their old values, but on a CPU like O3 with
renaming this is broken. The instruction needs to write the old values back
into the registers explicitly if they aren't being changed.

9023:e9201a7bce59 26-May-2012 Gabe Black <gblack@eecs.umich.edu>

CPU: Merge the predecoder and decoder.

These classes are always used together, and merging them will give the ISAs
more flexibility in how they cache things and manage the process.

9009:d45a02bd5391 19-May-2012 Marc Orr <marc.orr@gmail.com>

x86 ISA: Implement the sse3 haddps instruction.

Shuffle the 32 bit values into position, and then add in parallel.

8901:bba76d164f9e 19-Mar-2012 Andreas Hansson <andreas.hansson@arm.com>

clang: Fix recently introduced clang compilation errors

This patch makes the code compile with clang 2.9 and 3.0 again by
making two very minor changes. Firt, it maintains a strict typing in
the forward declaration of the BaseCPUParams. Second, it adds a
FullSystemInt flag of the type unsigned int next to the boolean
FullSystem flag. The FullSystemInt variable can be used in
decode-statements (expands to switch statements) in the instruction
decoder.

8738:66bf413b0d5b 30-Sep-2011 Gabe Black <gblack@eecs.umich.edu>

SE/FS: Use the new FullSystem constant where possible.

8558:a2f497ff53e4 19-Sep-2011 Gabe Black <gblack@eecs.umich.edu>

X86: Don't use "#if FULL_SYSTEM" in the X86 ISA description.

The decoder now checks the value of FULL_SYSTEM in a switch statement to
decide whether to return a real syscall instruction or one that triggers
syscall emulation (or a panic in FS mode). The switch statement should devolve
into an if, and also should be optimized out since it's based on constant
input.

8556:2afd82e84d95 19-Sep-2011 Gabe Black <gblack@eecs.umich.edu>

PseudoInst: Remove the now unnecessary #if FULL_SYSTEMs around pseudoinsts.

8555:6fd8d0432d8d 19-Sep-2011 Gabe Black <gblack@eecs.umich.edu>

Pseudoinst: Add an initParam pseudo inst function.

8106:4a194d4f6fb0 02-Mar-2011 Gabe Black <gblack@eecs.umich.edu>

X86: Decode the mysterious and elusive ffreep x87 instruction.

The internet says this instruction was created by accident when an Intel CPU
failed to decode x87 instructions properly. It's been documented on a few rare
occasions and has generally worked to ensure backwards compatability. One
source claims that the gcc toolchain is basically the only thing that emits
it, and that emulators/binary translators like qemu and bochs implement it.

We won't actually implement it here since we're hardly implementing any other
x87 instructions either. If we were to implement it, it would behave the same
as ffree but then also pop the register stack.

http://www.pagetable.com/?p=16

7914:eee5bb0fb8ea 07-Feb-2011 Brad Beckmann <Brad.Beckmann@amd.com>

m5: added work completed monitoring support

7789:f455790bcd47 08-Dec-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Take advantage of new PCState syntax.

7720:65d338a8dba4 31-Oct-2010 Gabe Black <gblack@eecs.umich.edu>

ISA,CPU,etc: Create an ISA defined PC type that abstracts out ISA behaviors.



This change is a low level and pervasive reorganization of how PCs are managed
in M5. Back when Alpha was the only ISA, there were only 2 PCs to worry about,
the PC and the NPC, and the lsb of the PC signaled whether or not you were in
PAL mode. As other ISAs were added, we had to add an NNPC, micro PC and next
micropc, x86 and ARM introduced variable length instruction sets, and ARM
started to keep track of mode bits in the PC. Each CPU model handled PCs in
its own custom way that needed to be updated individually to handle the new
dimensions of variability, or, in the case of ARMs mode-bit-in-the-pc hack,
the complexity could be hidden in the ISA at the ISA implementation's expense.
Areas like the branch predictor hadn't been updated to handle branch delay
slots or micropcs, and it turns out that had introduced a significant (10s of
percent) performance bug in SPARC and to a lesser extend MIPS. Rather than
perpetuate the problem by reworking O3 again to handle the PC features needed
by x86, this change was introduced to rework PC handling in a more modular,
transparent, and hopefully efficient way.


PC type:

Rather than having the superset of all possible elements of PC state declared
in each of the CPU models, each ISA defines its own PCState type which has
exactly the elements it needs. A cross product of canned PCState classes are
defined in the new "generic" ISA directory for ISAs with/without delay slots
and microcode. These are either typedef-ed or subclassed by each ISA. To read
or write this structure through a *Context, you use the new pcState() accessor
which reads or writes depending on whether it has an argument. If you just
want the address of the current or next instruction or the current micro PC,
you can get those through read-only accessors on either the PCState type or
the *Contexts. These are instAddr(), nextInstAddr(), and microPC(). Note the
move away from readPC. That name is ambiguous since it's not clear whether or
not it should be the actual address to fetch from, or if it should have extra
bits in it like the PAL mode bit. Each class is free to define its own
functions to get at whatever values it needs however it needs to to be used in
ISA specific code. Eventually Alpha's PAL mode bit could be moved out of the
PC and into a separate field like ARM.

These types can be reset to a particular pc (where npc = pc +
sizeof(MachInst), nnpc = npc + sizeof(MachInst), upc = 0, nupc = 1 as
appropriate), printed, serialized, and compared. There is a branching()
function which encapsulates code in the CPU models that checked if an
instruction branched or not. Exactly what that means in the context of branch
delay slots which can skip an instruction when not taken is ambiguous, and
ideally this function and its uses can be eliminated. PCStates also generally
know how to advance themselves in various ways depending on if they point at
an instruction, a microop, or the last microop of a macroop. More on that
later.

Ideally, accessing all the PCs at once when setting them will improve
performance of M5 even though more data needs to be moved around. This is
because often all the PCs need to be manipulated together, and by getting them
all at once you avoid multiple function calls. Also, the PCs of a particular
thread will have spatial locality in the cache. Previously they were grouped
by element in arrays which spread out accesses.


Advancing the PC:

The PCs were previously managed entirely by the CPU which had to know about PC
semantics, try to figure out which dimension to increment the PC in, what to
set NPC/NNPC, etc. These decisions are best left to the ISA in conjunction
with the PC type itself. Because most of the information about how to
increment the PC (mainly what type of instruction it refers to) is contained
in the instruction object, a new advancePC virtual function was added to the
StaticInst class. Subclasses provide an implementation that moves around the
right element of the PC with a minimal amount of decision making. In ISAs like
Alpha, the instructions always simply assign NPC to PC without having to worry
about micropcs, nnpcs, etc. The added cost of a virtual function call should
be outweighed by not having to figure out as much about what to do with the
PCs and mucking around with the extra elements.

One drawback of making the StaticInsts advance the PC is that you have to
actually have one to advance the PC. This would, superficially, seem to
require decoding an instruction before fetch could advance. This is, as far as
I can tell, realistic. fetch would advance through memory addresses, not PCs,
perhaps predicting new memory addresses using existing ones. More
sophisticated decisions about control flow would be made later on, after the
instruction was decoded, and handed back to fetch. If branching needs to
happen, some amount of decoding needs to happen to see that it's a branch,
what the target is, etc. This could get a little more complicated if that gets
done by the predecoder, but I'm choosing to ignore that for now.


Variable length instructions:

To handle variable length instructions in x86 and ARM, the predecoder now
takes in the current PC by reference to the getExtMachInst function. It can
modify the PC however it needs to (by setting NPC to be the PC + instruction
length, for instance). This could be improved since the CPU doesn't know if
the PC was modified and always has to write it back.


ISA parser:

To support the new API, all PC related operand types were removed from the
parser and replaced with a PCState type. There are two warts on this
implementation. First, as with all the other operand types, the PCState still
has to have a valid operand type even though it doesn't use it. Second, using
syntax like PCS.npc(target) doesn't work for two reasons, this looks like the
syntax for operand type overriding, and the parser can't figure out if you're
reading or writing. Instructions that use the PCS operand (which I've
consistently called it) need to first read it into a local variable,
manipulate it, and then write it back out.


Return address stack:

The return address stack needed a little extra help because, in the presence
of branch delay slots, it has to merge together elements of the return PC and
the call PC. To handle that, a buildRetPC utility function was added. There
are basically only two versions in all the ISAs, but it didn't seem short
enough to put into the generic ISA directory. Also, the branch predictor code
in O3 and InOrder were adjusted so that they always store the PC of the actual
call instruction in the RAS, not the next PC. If the call instruction is a
microop, the next PC refers to the next microop in the same macroop which is
probably not desirable. The buildRetPC function advances the PC intelligently
to the next macroop (in an ISA specific way) so that that case works.


Change in stats:

There were no change in stats except in MIPS and SPARC in the O3 model. MIPS
runs in about 9% fewer ticks. SPARC runs with 30%-50% fewer ticks, which could
likely be improved further by setting call/return instruction flags and taking
advantage of the RAS.


TODO:

Add != operators to the PCState classes, defined trivially to be !(a==b).
Smooth out places where PCs are split apart, passed around, and put back
together later. I think this might happen in SPARC's fault code. Add ISA
specific constructors that allow setting PC elements without calling a bunch
of accessors. Try to eliminate the need for the branching() function. Factor
out Alpha's PAL mode pc bit into a separate flag field, and eliminate places
where it's blindly masked out or tested in the PC.


/gem5/src/arch/alpha/ev5.cc
/gem5/src/arch/alpha/faults.cc
/gem5/src/arch/alpha/interrupts.hh
/gem5/src/arch/alpha/isa/branch.isa
/gem5/src/arch/alpha/isa/decoder.isa
/gem5/src/arch/alpha/isa/main.isa
/gem5/src/arch/alpha/predecoder.hh
/gem5/src/arch/alpha/process.cc
/gem5/src/arch/alpha/remote_gdb.cc
/gem5/src/arch/alpha/stacktrace.cc
/gem5/src/arch/alpha/tlb.cc
/gem5/src/arch/alpha/types.hh
/gem5/src/arch/alpha/utility.cc
/gem5/src/arch/alpha/utility.hh
/gem5/src/arch/arm/faults.cc
/gem5/src/arch/arm/insts/macromem.hh
/gem5/src/arch/arm/insts/mem.hh
/gem5/src/arch/arm/insts/pred_inst.hh
/gem5/src/arch/arm/insts/static_inst.hh
/gem5/src/arch/arm/insts/vfp.hh
/gem5/src/arch/arm/isa.cc
/gem5/src/arch/arm/isa/formats/breakpoint.isa
/gem5/src/arch/arm/isa/insts/branch.isa
/gem5/src/arch/arm/isa/insts/data.isa
/gem5/src/arch/arm/isa/insts/ldr.isa
/gem5/src/arch/arm/isa/insts/macromem.isa
/gem5/src/arch/arm/isa/insts/misc.isa
/gem5/src/arch/arm/isa/operands.isa
/gem5/src/arch/arm/isa_traits.hh
/gem5/src/arch/arm/linux/system.cc
/gem5/src/arch/arm/nativetrace.cc
/gem5/src/arch/arm/predecoder.cc
/gem5/src/arch/arm/predecoder.hh
/gem5/src/arch/arm/process.cc
/gem5/src/arch/arm/system.hh
/gem5/src/arch/arm/table_walker.cc
/gem5/src/arch/arm/tlb.cc
/gem5/src/arch/arm/types.hh
/gem5/src/arch/arm/utility.cc
/gem5/src/arch/arm/utility.hh
/gem5/src/arch/generic/types.hh
/gem5/src/arch/isa_parser.py
/gem5/src/arch/mips/isa/base.isa
/gem5/src/arch/mips/isa/decoder.isa
/gem5/src/arch/mips/isa/formats/branch.isa
/gem5/src/arch/mips/isa/includes.isa
/gem5/src/arch/mips/isa/operands.isa
/gem5/src/arch/mips/mt.hh
/gem5/src/arch/mips/predecoder.hh
/gem5/src/arch/mips/process.cc
/gem5/src/arch/mips/types.hh
/gem5/src/arch/mips/utility.cc
/gem5/src/arch/mips/utility.hh
/gem5/src/arch/power/insts/branch.cc
/gem5/src/arch/power/insts/branch.hh
/gem5/src/arch/power/insts/static_inst.hh
/gem5/src/arch/power/isa/decoder.isa
/gem5/src/arch/power/isa/formats/branch.isa
/gem5/src/arch/power/isa/formats/unknown.isa
/gem5/src/arch/power/isa/operands.isa
/gem5/src/arch/power/predecoder.hh
/gem5/src/arch/power/process.cc
/gem5/src/arch/power/types.hh
/gem5/src/arch/power/utility.cc
/gem5/src/arch/power/utility.hh
/gem5/src/arch/sparc/faults.cc
/gem5/src/arch/sparc/isa/base.isa
/gem5/src/arch/sparc/isa/decoder.isa
/gem5/src/arch/sparc/isa/formats/branch.isa
/gem5/src/arch/sparc/isa/formats/micro.isa
/gem5/src/arch/sparc/isa/operands.isa
/gem5/src/arch/sparc/nativetrace.cc
/gem5/src/arch/sparc/predecoder.hh
/gem5/src/arch/sparc/process.cc
/gem5/src/arch/sparc/remote_gdb.cc
/gem5/src/arch/sparc/types.hh
/gem5/src/arch/sparc/utility.cc
/gem5/src/arch/sparc/utility.hh
/gem5/src/arch/x86/faults.cc
/gem5/src/arch/x86/insts/macroop.hh
/gem5/src/arch/x86/insts/microop.hh
/gem5/src/arch/x86/insts/static_inst.hh
two_byte_opcodes.isa
/gem5/src/arch/x86/isa/formats/unknown.isa
/gem5/src/arch/x86/isa/microops/regop.isa
/gem5/src/arch/x86/isa/microops/seqop.isa
/gem5/src/arch/x86/isa/operands.isa
/gem5/src/arch/x86/nativetrace.cc
/gem5/src/arch/x86/predecoder.hh
/gem5/src/arch/x86/process.cc
/gem5/src/arch/x86/system.cc
/gem5/src/arch/x86/tlb.cc
/gem5/src/arch/x86/types.hh
/gem5/src/arch/x86/utility.cc
/gem5/src/arch/x86/utility.hh
/gem5/src/base/remote_gdb.cc
/gem5/src/base/types.hh
/gem5/src/cpu/base_dyn_inst.hh
/gem5/src/cpu/base_dyn_inst_impl.hh
/gem5/src/cpu/checker/cpu.hh
/gem5/src/cpu/exetrace.cc
/gem5/src/cpu/exetrace.hh
/gem5/src/cpu/inorder/comm.hh
/gem5/src/cpu/inorder/cpu.cc
/gem5/src/cpu/inorder/cpu.hh
/gem5/src/cpu/inorder/first_stage.cc
/gem5/src/cpu/inorder/inorder_dyn_inst.cc
/gem5/src/cpu/inorder/inorder_dyn_inst.hh
/gem5/src/cpu/inorder/inorder_trace.cc
/gem5/src/cpu/inorder/inorder_trace.hh
/gem5/src/cpu/inorder/pipeline_stage.cc
/gem5/src/cpu/inorder/pipeline_stage.hh
/gem5/src/cpu/inorder/resources/bpred_unit.cc
/gem5/src/cpu/inorder/resources/bpred_unit.hh
/gem5/src/cpu/inorder/resources/branch_predictor.cc
/gem5/src/cpu/inorder/resources/cache_unit.cc
/gem5/src/cpu/inorder/resources/execution_unit.cc
/gem5/src/cpu/inorder/resources/fetch_seq_unit.cc
/gem5/src/cpu/inorder/resources/fetch_seq_unit.hh
/gem5/src/cpu/inorder/resources/tlb_unit.hh
/gem5/src/cpu/inorder/thread_context.cc
/gem5/src/cpu/inorder/thread_context.hh
/gem5/src/cpu/inorder/thread_state.hh
/gem5/src/cpu/inteltrace.cc
/gem5/src/cpu/inteltrace.hh
/gem5/src/cpu/legiontrace.cc
/gem5/src/cpu/legiontrace.hh
/gem5/src/cpu/nativetrace.hh
/gem5/src/cpu/o3/bpred_unit.hh
/gem5/src/cpu/o3/bpred_unit_impl.hh
/gem5/src/cpu/o3/comm.hh
/gem5/src/cpu/o3/commit.hh
/gem5/src/cpu/o3/commit_impl.hh
/gem5/src/cpu/o3/cpu.cc
/gem5/src/cpu/o3/cpu.hh
/gem5/src/cpu/o3/decode_impl.hh
/gem5/src/cpu/o3/dep_graph.hh
/gem5/src/cpu/o3/dyn_inst.hh
/gem5/src/cpu/o3/dyn_inst_impl.hh
/gem5/src/cpu/o3/fetch.hh
/gem5/src/cpu/o3/fetch_impl.hh
/gem5/src/cpu/o3/iew_impl.hh
/gem5/src/cpu/o3/inst_queue_impl.hh
/gem5/src/cpu/o3/lsq_unit.hh
/gem5/src/cpu/o3/lsq_unit_impl.hh
/gem5/src/cpu/o3/mem_dep_unit_impl.hh
/gem5/src/cpu/o3/rename_impl.hh
/gem5/src/cpu/o3/rob_impl.hh
/gem5/src/cpu/o3/thread_context.hh
/gem5/src/cpu/o3/thread_context_impl.hh
/gem5/src/cpu/pc_event.cc
/gem5/src/cpu/pred/btb.cc
/gem5/src/cpu/pred/btb.hh
/gem5/src/cpu/pred/ras.cc
/gem5/src/cpu/pred/ras.hh
/gem5/src/cpu/simple/atomic.cc
/gem5/src/cpu/simple/base.cc
/gem5/src/cpu/simple/base.hh
/gem5/src/cpu/simple/timing.cc
/gem5/src/cpu/simple_thread.cc
/gem5/src/cpu/simple_thread.hh
/gem5/src/cpu/static_inst.cc
/gem5/src/cpu/static_inst.hh
/gem5/src/cpu/thread_context.cc
/gem5/src/cpu/thread_context.hh
/gem5/src/kern/system_events.cc
/gem5/src/kern/tru64/tru64.hh
/gem5/src/sim/faults.cc
/gem5/src/sim/insttracer.hh
/gem5/src/sim/syscall_emul.cc
/gem5/src/sim/syscall_emul.hh
7718:6333e66ce74b 29-Oct-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Make syscalls also serialize after.

7715:5581d0cd2bdb 22-Oct-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Make nop a regular, non-microcoded instruction.

Code in the CPUs that need a nop to carry a fault can't easily deal with a
microcoded nop. This instruction format provides for one that isn't.

7713:ce987fa77797 22-Oct-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Make syscall instructions non-speculative in SE.

7087:fb8d5786ff30 24-May-2010 Nathan Binkert <nate@binkert.org>

copyright: Change HP copyright on x86 code to be more friendly


/gem5/src/arch/x86/SConscript
/gem5/src/arch/x86/X86System.py
/gem5/src/arch/x86/X86TLB.py
/gem5/src/arch/x86/arguments.hh
/gem5/src/arch/x86/bios/ACPI.py
/gem5/src/arch/x86/bios/E820.py
/gem5/src/arch/x86/bios/IntelMP.py
/gem5/src/arch/x86/bios/SConscript
/gem5/src/arch/x86/bios/SMBios.py
/gem5/src/arch/x86/bios/acpi.cc
/gem5/src/arch/x86/bios/acpi.hh
/gem5/src/arch/x86/bios/e820.cc
/gem5/src/arch/x86/bios/e820.hh
/gem5/src/arch/x86/bios/intelmp.cc
/gem5/src/arch/x86/bios/intelmp.hh
/gem5/src/arch/x86/bios/smbios.cc
/gem5/src/arch/x86/bios/smbios.hh
/gem5/src/arch/x86/emulenv.cc
/gem5/src/arch/x86/emulenv.hh
/gem5/src/arch/x86/faults.cc
/gem5/src/arch/x86/faults.hh
/gem5/src/arch/x86/floatregs.hh
/gem5/src/arch/x86/insts/macroop.hh
/gem5/src/arch/x86/insts/microfpop.cc
/gem5/src/arch/x86/insts/microfpop.hh
/gem5/src/arch/x86/insts/microldstop.cc
/gem5/src/arch/x86/insts/microldstop.hh
/gem5/src/arch/x86/insts/microop.cc
/gem5/src/arch/x86/insts/microop.hh
/gem5/src/arch/x86/insts/microregop.cc
/gem5/src/arch/x86/insts/microregop.hh
/gem5/src/arch/x86/insts/static_inst.cc
/gem5/src/arch/x86/insts/static_inst.hh
/gem5/src/arch/x86/interrupts.cc
/gem5/src/arch/x86/interrupts.hh
/gem5/src/arch/x86/intregs.hh
/gem5/src/arch/x86/isa/bitfields.isa
decoder.isa
one_byte_opcodes.isa
two_byte_opcodes.isa
x87.isa
/gem5/src/arch/x86/isa/formats/basic.isa
/gem5/src/arch/x86/isa/formats/cpuid.isa
/gem5/src/arch/x86/isa/formats/error.isa
/gem5/src/arch/x86/isa/formats/formats.isa
/gem5/src/arch/x86/isa/formats/multi.isa
/gem5/src/arch/x86/isa/formats/string.isa
/gem5/src/arch/x86/isa/formats/syscall.isa
/gem5/src/arch/x86/isa/formats/unimp.isa
/gem5/src/arch/x86/isa/formats/unknown.isa
/gem5/src/arch/x86/isa/includes.isa
/gem5/src/arch/x86/isa/insts/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/arithmetic/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py
/gem5/src/arch/x86/isa/insts/general_purpose/arithmetic/increment_and_decrement.py
/gem5/src/arch/x86/isa/insts/general_purpose/arithmetic/multiply_and_divide.py
/gem5/src/arch/x86/isa/insts/general_purpose/cache_and_memory_management.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_scan.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_test.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/bounds.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/compare.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/set_byte_on_condition.py
/gem5/src/arch/x86/isa/insts/general_purpose/compare_and_test/test.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/conditional_jump.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py
/gem5/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/ascii_adjust.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/bcd_adjust.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/extract_sign_mask.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/sign_extension.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_conversion/translate.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_transfer/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_transfer/conditional_move.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_transfer/move.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py
/gem5/src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py
/gem5/src/arch/x86/isa/insts/general_purpose/flags/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py
/gem5/src/arch/x86/isa/insts/general_purpose/flags/push_and_pop.py
/gem5/src/arch/x86/isa/insts/general_purpose/flags/set_and_clear.py
/gem5/src/arch/x86/isa/insts/general_purpose/input_output/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/input_output/general_io.py
/gem5/src/arch/x86/isa/insts/general_purpose/input_output/string_io.py
/gem5/src/arch/x86/isa/insts/general_purpose/load_effective_address.py
/gem5/src/arch/x86/isa/insts/general_purpose/load_segment_registers.py
/gem5/src/arch/x86/isa/insts/general_purpose/logical.py
/gem5/src/arch/x86/isa/insts/general_purpose/no_operation.py
/gem5/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/rotate.py
/gem5/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/shift.py
/gem5/src/arch/x86/isa/insts/general_purpose/semaphores.py
/gem5/src/arch/x86/isa/insts/general_purpose/string/__init__.py
/gem5/src/arch/x86/isa/insts/general_purpose/string/compare_strings.py
/gem5/src/arch/x86/isa/insts/general_purpose/string/load_string.py
/gem5/src/arch/x86/isa/insts/general_purpose/string/move_string.py
/gem5/src/arch/x86/isa/insts/general_purpose/string/scan_string.py
/gem5/src/arch/x86/isa/insts/general_purpose/string/store_string.py
/gem5/src/arch/x86/isa/insts/general_purpose/system_calls.py
/gem5/src/arch/x86/isa/insts/simd128/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/horizontal_addition.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/horizontal_subtraction.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/multiplication.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_square_root.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/square_root.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/compare/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_mask.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/shuffle.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/unpack_and_interleave.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_mask.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_non_temporal.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_with_duplication.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/logical/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/logical/exclusive_or.py
/gem5/src/arch/x86/isa/insts/simd128/floating_point/logical/orp.py
/gem5/src/arch/x86/isa/insts/simd128/integer/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/addition.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/average.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiplication.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/subtraction.py
/gem5/src/arch/x86/isa/insts/simd128/integer/arithmetic/sum_of_absolute_differences.py
/gem5/src/arch/x86/isa/insts/simd128/integer/compare/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/compare/compare_and_write_mask.py
/gem5/src/arch/x86/isa/insts/simd128/integer/compare/compare_and_write_minimum_or_maximum.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_conversion/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_conversion/convert_integer_to_floating_point.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_reordering/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_reordering/pack_with_saturation.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_transfer/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_transfer/move.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_transfer/move_mask.py
/gem5/src/arch/x86/isa/insts/simd128/integer/data_transfer/move_non_temporal.py
/gem5/src/arch/x86/isa/insts/simd128/integer/logical/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/logical/exclusive_or.py
/gem5/src/arch/x86/isa/insts/simd128/integer/logical/pand.py
/gem5/src/arch/x86/isa/insts/simd128/integer/logical/por.py
/gem5/src/arch/x86/isa/insts/simd128/integer/save_and_restore_state/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py
/gem5/src/arch/x86/isa/insts/simd128/integer/save_and_restore_state/save_and_restore_state.py
/gem5/src/arch/x86/isa/insts/simd128/integer/shift/__init__.py
/gem5/src/arch/x86/isa/insts/simd128/integer/shift/left_logical_shift.py
/gem5/src/arch/x86/isa/insts/simd128/integer/shift/right_arithmetic_shift.py
/gem5/src/arch/x86/isa/insts/simd128/integer/shift/right_logical_shift.py
/gem5/src/arch/x86/isa/insts/simd64/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/accumulation.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/addition.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/multiplication.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/reciprocal_estimation.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/reciprocal_square_root.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/subtraction.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/compare/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/compare/compare_and_write_mask.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py
/gem5/src/arch/x86/isa/insts/simd64/floating_point/data_conversion.py
/gem5/src/arch/x86/isa/insts/simd64/integer/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/average.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/multiplication.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/multiply_add.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/subtraction.py
/gem5/src/arch/x86/isa/insts/simd64/integer/arithmetic/sum_of_absolute_differences.py
/gem5/src/arch/x86/isa/insts/simd64/integer/compare/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/compare/compare_and_write_mask.py
/gem5/src/arch/x86/isa/insts/simd64/integer/compare/compare_and_write_minimum_or_maximum.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_conversion.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_reordering/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_reordering/pack_with_saturation.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_reordering/shuffle_and_swap.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_reordering/unpack_and_interleave.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_transfer/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_transfer/move.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_transfer/move_mask.py
/gem5/src/arch/x86/isa/insts/simd64/integer/data_transfer/move_non_temporal.py
/gem5/src/arch/x86/isa/insts/simd64/integer/exit_media_state.py
/gem5/src/arch/x86/isa/insts/simd64/integer/logical/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/logical/exclusive_or.py
/gem5/src/arch/x86/isa/insts/simd64/integer/logical/pand.py
/gem5/src/arch/x86/isa/insts/simd64/integer/logical/por.py
/gem5/src/arch/x86/isa/insts/simd64/integer/save_and_restore_state.py
/gem5/src/arch/x86/isa/insts/simd64/integer/shift/__init__.py
/gem5/src/arch/x86/isa/insts/simd64/integer/shift/left_logical_shift.py
/gem5/src/arch/x86/isa/insts/simd64/integer/shift/right_arithmetic_shift.py
/gem5/src/arch/x86/isa/insts/simd64/integer/shift/right_logical_shift.py
/gem5/src/arch/x86/isa/insts/system/__init__.py
/gem5/src/arch/x86/isa/insts/system/halt.py
/gem5/src/arch/x86/isa/insts/system/invlpg.py
/gem5/src/arch/x86/isa/insts/system/msrs.py
/gem5/src/arch/x86/isa/insts/system/segmentation.py
/gem5/src/arch/x86/isa/insts/system/undefined_operation.py
/gem5/src/arch/x86/isa/insts/x87/__init__.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/__init__.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/addition.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/change_sign.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/division.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/multiplication.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/round.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/square_root.py
/gem5/src/arch/x86/isa/insts/x87/arithmetic/subtraction.py
/gem5/src/arch/x86/isa/insts/x87/compare_and_test/__init__.py
/gem5/src/arch/x86/isa/insts/x87/compare_and_test/classify.py
/gem5/src/arch/x86/isa/insts/x87/compare_and_test/floating_point_ordered_compare.py
/gem5/src/arch/x86/isa/insts/x87/compare_and_test/floating_point_unordered_compare.py
/gem5/src/arch/x86/isa/insts/x87/compare_and_test/integer_compare.py
/gem5/src/arch/x86/isa/insts/x87/compare_and_test/test.py
/gem5/src/arch/x86/isa/insts/x87/control/__init__.py
/gem5/src/arch/x86/isa/insts/x87/control/clear_exceptions.py
/gem5/src/arch/x86/isa/insts/x87/control/initialize.py
/gem5/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_control_word.py
/gem5/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_environment.py
/gem5/src/arch/x86/isa/insts/x87/control/save_x87_status_word.py
/gem5/src/arch/x86/isa/insts/x87/control/wait_for_exceptions.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/__init__.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/conditional_move.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/exchange.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/extract.py
/gem5/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/load_or_store_floating_point.py
/gem5/src/arch/x86/isa/insts/x87/load_constants/__init__.py
/gem5/src/arch/x86/isa/insts/x87/load_constants/load_0_1_or_pi.py
/gem5/src/arch/x86/isa/insts/x87/load_constants/load_logarithm.py
/gem5/src/arch/x86/isa/insts/x87/no_operation.py
/gem5/src/arch/x86/isa/insts/x87/stack_management/__init__.py
/gem5/src/arch/x86/isa/insts/x87/stack_management/clear_state.py
/gem5/src/arch/x86/isa/insts/x87/stack_management/stack_control.py
/gem5/src/arch/x86/isa/insts/x87/transcendental_functions/__init__.py
/gem5/src/arch/x86/isa/insts/x87/transcendental_functions/logarithmic_functions.py
/gem5/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py
/gem5/src/arch/x86/isa/macroop.isa
/gem5/src/arch/x86/isa/main.isa
/gem5/src/arch/x86/isa/microasm.isa
/gem5/src/arch/x86/isa/microops/base.isa
/gem5/src/arch/x86/isa/microops/debug.isa
/gem5/src/arch/x86/isa/microops/fpop.isa
/gem5/src/arch/x86/isa/microops/ldstop.isa
/gem5/src/arch/x86/isa/microops/limmop.isa
/gem5/src/arch/x86/isa/microops/microops.isa
/gem5/src/arch/x86/isa/microops/regop.isa
/gem5/src/arch/x86/isa/microops/seqop.isa
/gem5/src/arch/x86/isa/microops/specop.isa
/gem5/src/arch/x86/isa/operands.isa
/gem5/src/arch/x86/isa/outputblock.isa
/gem5/src/arch/x86/isa/specialize.isa
/gem5/src/arch/x86/isa_traits.hh
/gem5/src/arch/x86/kernel_stats.hh
/gem5/src/arch/x86/linux/linux.cc
/gem5/src/arch/x86/linux/linux.hh
/gem5/src/arch/x86/linux/process.cc
/gem5/src/arch/x86/linux/process.hh
/gem5/src/arch/x86/linux/syscalls.cc
/gem5/src/arch/x86/linux/system.cc
/gem5/src/arch/x86/linux/system.hh
/gem5/src/arch/x86/miscregs.hh
/gem5/src/arch/x86/mmaped_ipr.hh
/gem5/src/arch/x86/pagetable.cc
/gem5/src/arch/x86/pagetable.hh
/gem5/src/arch/x86/pagetable_walker.cc
/gem5/src/arch/x86/pagetable_walker.hh
/gem5/src/arch/x86/predecoder.cc
/gem5/src/arch/x86/predecoder.hh
/gem5/src/arch/x86/predecoder_tables.cc
/gem5/src/arch/x86/process.cc
/gem5/src/arch/x86/process.hh
/gem5/src/arch/x86/registers.hh
/gem5/src/arch/x86/remote_gdb.cc
/gem5/src/arch/x86/remote_gdb.hh
/gem5/src/arch/x86/segmentregs.hh
/gem5/src/arch/x86/system.cc
/gem5/src/arch/x86/system.hh
/gem5/src/arch/x86/tlb.cc
/gem5/src/arch/x86/tlb.hh
/gem5/src/arch/x86/types.hh
/gem5/src/arch/x86/utility.cc
/gem5/src/arch/x86/utility.hh
/gem5/src/arch/x86/vtophys.cc
/gem5/src/arch/x86/vtophys.hh
/gem5/src/arch/x86/x86_traits.hh
7072:d9823ce926fa 02-May-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Sometimes CPUID depends on ecx, so pass that in.

6867:a5511b8990ea 05-Nov-2009 Nathan Binkert <nate@binkert.org>

compile: compile on 32 bit hardware

6707:0e5037cecaf7 30-Oct-2009 Vince Weaver <vince@csl.cornell.edu>

X86: Add support for x86 psrldq and pslldq instructions

These are complicated instructions and the micro-code might be suboptimal.

This has been tested with some small sample programs (attached)

The psrldq instruction is needed by various spec2k programs.

6706:ea20065f6614 30-Oct-2009 Vince Weaver <vince@csl.cornell.edu>

X86: Implement movd_Vo_Edp on X86

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.

6705:3c810b64ee7d 30-Oct-2009 Vince Weaver <vince@csl.cornell.edu>

X86: Implement the X86 sse2 haddpd instruction

This patch implements the haddpd instruction.

It fixes the problem in the previous version (pointed out by Gabe Black)
where an incorrect result would happen if you issue the instruction
with the same argument twice, i.e. "haddpd %xmm0,%xmm0"

This instruction is used by many spec2k benchmarks.

6696:e533bec78924 21-Oct-2009 Vince Weaver <vince@csl.cornell.edu>

Implement X86 sse2 movdqu and movdqa instructions

The movdqa instruction should enforce 16-byte alignment.
This implementation does not do that.

These instructions are needed for most of x86_64 spec2k to run.

6619:de112a8ac3d8 20-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Fix the decoding for and fill out FST and FSTP.

6616:33837b097d69 18-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Decode the immediate byte opcode extension for 3dNow! instructions.

6615:f0e4e63310e5 18-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Decode three byte opcodes.

6611:2cd76560a1f1 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Double check the two byte portion of the decoder and fix bugs/clean up.

6610:dbfe22c711d5 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement MOVNTI.

6608:6d1f74b21533 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement MOVQ2DQ.

6607:dba8e329e783 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement MOVDQ2Q.

6606:03fd282998d0 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media instructions that convert fp values to ints.

6604:b750348f6da3 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the instructions that compare fp values and write a mask as a result.

6602:95b882ce7b10 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the instructions that compare fp values and write to rflags.

6600:bb997cd711af 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement MOVSS.

6599:a578850e7524 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement LDMXCSR.

6598:82d1d4d217e4 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement STMXCSR.

6597:4903cea6a8c2 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the shuffle media instructions.

6595:2aec993cdd8f 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the mask move instructions.

6593:f27fd3c3a153 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the instructions that move sign bits.

6591:3d1ea9362fe5 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the insert/extract instructions.

6590:b617e9c8352e 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Fix a bug in the decoder where the insert/extract instructions go.

6588:f449753172ee 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media average instructions.

6586:e8af0cf94c37 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the multiply and add instructions.

6584:5355f44912f6 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media shifts that operate on 64 bits or less at a time.

6582:7e1af04f4ead 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the sum of absolute differences instructions.

6580:a1c40860fe09 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media integer subtract instructions.

6578:825b77196521 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the integer media multiply instructions.

6576:8038b47efe64 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Make larger blocks of instructions use the Inst format by default.

6575:e5a3ae40c4d0 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the integer media max instructions.

6573:6e14c5d36a1a 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the integer media min instructions.

6571:91d9599956f3 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media integer addition instructions.

6569:e8cb266c9451 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the instructions that convert between forms of floating point.

6567:819107c2c851 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the instructions that compare fp values and write masks as the result.

6565:b7f5a02ea9b7 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the MOVDDUP instruction.

6564:9ed64f6888cf 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement many of the media mov instructions.

6563:2c5b80c75da7 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media instructions that convert integer values to floating point.

6561:3f716cda05c9 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the floating point media instructions.

6559:e4f60f716103 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the floating point media multiply instructions.

6557:f677e05d723d 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the floating point media subtract instructions.

6555:dae81a15cfcc 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the floating point media add instructions.

6553:897523ead7ce 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media sqrt instructions.

6551:52b4167056ed 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media floating point max instructions.

6549:d6ae13f56801 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the media floating point min instructions.

6547:3f6c31c3d59e 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the pack instructions.

6543:a9a5dd560925 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the remaining unpack instructions.

6542:059e35b593a8 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PANDN, ANDNPS, and ANDNPD.

6540:17414b661543 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PAND, ANDPS, and ANDPD.

6538:6cf5a0235ae8 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement POR, ORPD and ORPS.

6536:dc54f4fd6116 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PXOR.

6535:b595412884f9 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: (Re)implement XORPS and XORPD.

6533:2977e2e2dc27 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKLQDQ.

6532:f7c42d003529 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKHQDQ.

6531:6e2f4aa11482 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKHDQ.

6530:cdb6bde20266 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKHWD.

6529:cde96afcb3e3 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKHBW.

6528:5c3a713ec1bb 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKLDQ.

6527:4af40cccf527 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement PUNPCKLWD.

6526:2f72755b4af7 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the versions of PUNPCKLBW that use XMM registers.

6525:b252af5cda46 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the MOVQ instruction.

6523:da0f91a2d60b 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the versions of MOVD that have an MMX source.

6522:c256e28ad056 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the versions of PUNPCKLBW that use MMX registers.

6520:962f58808d53 17-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the versions of MOVD that have an MMX destination.

6486:33faa9915d16 09-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the CMPXCHG8B/CMPXCHG16B instruction.

6484:c72296d5ee85 09-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Decode byte sized singed divide as byte sized.

6481:fa6d324aa2f9 07-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: (Re)Implemented SHRD.

6480:ed9d773de88f 07-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement SHLD.

6477:f3c9335ec2cd 07-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Use the right field when using legacy prefixes to distinguish instructions.

6460:59108c231208 05-Aug-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Use the new forced folding mechanism for the SAHF and LAHF instructions.

6100:a61ac4a3591d 19-Apr-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Fix up a copyright.

6098:34690e3cf53e 19-Apr-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Recognize and handle the lock legacy prefix.

6060:3d524dc980a8 19-Apr-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement far jmp.

6055:40bdbc32e3db 19-Apr-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the save machine status word instruction (SMSW).

6054:0aa0a6189767 19-Apr-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the load machine status word instruction (LMSW).

6052:2b660729f136 19-Apr-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Only use %eax to select a function and look like we support sse2.

5977:4fff54ab52ae 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement shrd.

5972:63611864864f 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement sysenter as a system call interface.

5967:ff9203dd7608 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Fix a decoder bug and add in some missing instructions.

5957:f24733876990 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the int system call interface in the decoder.

5937:177534612ec0 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the lldt instruction.

5933:8b9bc09b149c 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement CLTS.

5931:d42d507ccdb1 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the mov to debug register intructions.

5923:9a024981aa60 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the fence instructions. These are not microcoded.

5920:5a9c976270d6 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement a basic prefetch instruction.

5908:c24a1ffc4ad0 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the sysret instruction in long mode.

5907:8a633e6a8df1 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the longmode versions of the syscall instruction.

5902:7a323daa3df2 25-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the LTR instruction.

5815:18ed7aa8e8e1 25-Jan-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the xadd instruction.

5814:a9e8668557bf 25-Jan-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the bswap instruction.

5789:46c548dbe620 07-Jan-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Hook in the M5 pseudo insts.

5683:e1a1d8bba254 13-Oct-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the swapgs instruction.

5659:f4b9c344d1ca 12-Oct-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Implement CPUID with a magical function instead of microcode.

5448:67c8b7badec1 12-Jun-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Implement and hook up STI and CLI instructions.

5434:2f6dad874e14 12-Jun-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Implement a partial, sort of correct version of the protected mode variant of iret.

5422:f1f490fe77b0 12-Jun-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Flesh out 3dnow instruction decoding a bit and grab the byte immediate.

5409:0343cd06df4f 12-Jun-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Add in some support for the tsc register.

5359:8c6ff200e4c1 26-Feb-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the INVLPG instruction and the TIA microop.

5332:0e25e0b6982c 22-Jan-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Implement and attach the BSR and BSF instructions.

5331:8d8aaad0bc36 21-Jan-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Fill out group17 in the decoder.

5296:5caa774215cd 02-Dec-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement mov from control register.

5295:5268691561b4 02-Dec-2007 Gabe Black <gblack@eecs.umich.edu>

X86: First crack at far returns. This is grossly approximate.

5294:7222bdaed33b 02-Dec-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Reorganize segmentation and implement segment selector movs.

5292:a26311673ef0 02-Dec-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the LIDT instruction.

5291:5d38610cff05 02-Dec-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the lgdt instruction.

5241:a6602acdd046 12-Nov-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the wrcr microop which writes a control register, and some control register work.

5240:6dc723c9c6a9 12-Nov-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement some bit testing instructions.

5238:95f494fd38bd 12-Nov-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Flesh out the opcode groups for two byte opcodes.

5174:73a760aa0129 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the PUSHF, POPF, SAHF, and LAHF instructions.

5173:07204d59a328 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Impelement the HLT instruction and fix the "halt" microop.

5171:eab735dc951d 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the ENTER instruction. This could probably be optimized by cleaning up the indexing in the main loop.

5168:0fee957f6842 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Replace "group10" placeholder with the corresponding instructions in the decoder.

5167:3668fc87f144 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the string IO instructions, ins and outs.

5166:d749d156ce52 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the undocumented SALC instruction which sets AL to 0xFF if CF=1 and 0x00 otherwise.

5165:ce7b4b8a24c5 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the XLAT instruction.

5164:c2124685af1d 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the BOUND instruction.

5162:5af26efb306e 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Make "Inst" the default format instead of WarnUnimpl for one byte opcodes.

5161:e7334f2d7bef 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the in/out instructions. These will still need support from the TLB and memory system.

5160:ada1b67c97ab 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the LOOP instructions.

5159:31547ed6b8b5 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Attach the CMC instruction to the decoder.

5158:8cf2433105ff 19-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implemented the jrcx instruction.

5151:dec27c6c2b3b 12-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Added some new versions of MOV and a new argument type tag.

5150:4b5a97744185 12-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implemented LODS.

5149:356e00996637 12-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement MSR reads and writes and the wrsmr and rdmsr instructions.
There are no priviledge checks, so these instructions will all work in all
modes.

5125:62bd932bcb0b 03-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Distinguish between the rep and repe prefixes.
STOS and MOVS only accept the rep prefix which always loops until rcx becomes
0. The other string instructions accept repe (same encoding as rep) and repne
which also check the condition code flags each iteration.

5113:a377765c0d4a 03-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Hook in another version of the XCHG instruction.

5112:fccb2f791196 03-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement MOVS

5111:65afc8009c08 03-Oct-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement STOS.

5084:675cb680830f 19-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the fld, fst, and fstp instructions.

5059:33478a26f73e 06-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Add a square root microop and the SSE sqrt instruction.

5058:be23162b7370 06-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Add SSE comparison instructions and microops and move some FP microops to be with the other ones.

5052:791ae1b04d72 05-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement an SSE xor microop and instruction.

5047:4a3593bec248 05-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement some SSE fp microops and instructions.

5046:da031ef02439 05-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Add some SSE floating point/integer conversion microops.

5043:a69b7f532f79 05-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement idiv and propogate the mul corner case fix.

5031:53b9e86e652d 29-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the movaps instruction.

5030:bd8f65d4ac59 29-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the movsd instruction.

5029:68c3f3be8c8a 29-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the movlpd instruction.

5022:476ccbb674ee 28-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: More two byte opcode decoding. I missed two groups in the last changeset.

5020:d34fd894a6e5 28-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: More fully decode two byte opcodes.
This includes the most of the SSE stuff, but not some of the "groups" of
instructions.

5006:46bde2e856dd 26-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement cmps (string compare)

4953:1181cf10e11e 07-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implemented and hooked in SCAS (scan string)
Fixed the asz assembler symbol.
Adjusted the condion checks to have appropriate options.
Implemented the SCAS microcode.
Attached SCAS into the decoder.

4868:99d4946469a1 04-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement microops and instructions that manipulate the flags register.

4864:a78c58ce5499 04-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Implement the cmpxchg instruction.

4828:768d4cf6b0dc 31-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Add a flag to indicate an instruction triggers a syscall in SE mode.

4827:d4ea1bbfdbc3 31-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Add operand type information to the fnstcw and fldw instruction placeholders.
These are the only floating point instructions that get used in my simple hello world test. These instructions are for setting up the floating point control register. Their not being implemented doesn't affect anything because floating point isn't used.

4825:93a992aa87f6 30-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Add decoding for x87 floating point.

4824:32dac1e3bcd8 30-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Attach the "DIV" instruction implementation to the decoder.

4814:d398decc8de8 30-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Hook in the new instructions.

4771:d4b92447a598 27-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Hook in shift and rotate by one instructions, and NOT.

4760:0116da6a4963 24-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Hook in a bunch of new instructions, fix a few minor bugs, and expand out one of the prefix multiplexed opcode groups.

4747:0971cd0cf1da 23-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implement pusha, popa, three operand imul, hook them into the decoder, and clean up the decoder a little.

4746:7960a6867f55 22-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Make the operand size reflect the size specifier on the operand tags, and implement NEG

4734:a71b1b6b0678 21-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implemented and hooked in xchg, rotate with carry, and ret instructions

4732:9fdd1a5ab692 21-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Fixed the distinction between far and near versions of jmp, call and ret. Implemented some shifts, rotates, and pushes.

4730:77e3e9b15e7e 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implement UD2 and replace the place holder in the decoder.

4728:d60b98171bef 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implement adc and sbb instructions and microops.

4727:8a6b7746df57 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implement the rest of the conditional jump instructions and hook them into the decoder.

4726:c474eca232e4 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Make the decoder take advantage of the new "B" operand format which takes a register index from the opcode itself.

4725:441c280b5936 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Define and fill out a lot of different instructions and instruction versions. Added two of the shift microops.

4724:ba9aff3fe5d7 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Hook in newly implemented instructions.

4712:79b4c64296ce 19-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

x86 fixes
Make the emulation environment consider the rex prefix.
Implement and hook in forms of j, jmp, cmp, syscall, movzx
Added a format for an instruction to carry a call to the SE mode syscalls system
Made memory instructions which refer to the rip do so directly
Made the operand size overridable in the microassembly
Made the "ext" field of register operations 16 bits to hold a sparse encoding of flags to set or conditions to predicate on
Added an explicit "rax" operand for the syscall format
Implemented syscall returns.

4711:dec658eb8f49 18-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Check for the two opcode prefix correctly and add in some instructions.

4710:8f0c44a432c8 18-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Hook near returns into the decoder.

4703:4158cad49287 18-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implement some forms of add.

4702:8d3a38ec94d9 18-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Fix the operand types in a section of the decoder.

4699:ee46bb3b2fd3 18-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Hook x86 nop into the decoder.

4692:8536c20cdc5b 17-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implemented jnz.

4690:1f1a4393c47c 17-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Implement the jz instruction.

4606:e94aaf0b3355 20-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Fix a typo in one of the operand type tags.

4601:38c989d15fef 20-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Make memory instructions work better, add more macroop implementations, add an lea microop, move EmulEnv into it's own .cc and .hh.

4595:5162e9a7728c 19-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

More faithfulness to what instructions should work in what modes, and added the MOVSXD instruction.

4592:520664dfb26f 19-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Make instructions that are illegal in 64 bit mode not do the wrong thing in 64 bit mode. Also add in more versions of PUSH and POP, and a version of near CALL.

4575:d0017efdfa02 14-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Implement a handful more instructions and differentiate macroops based on the operand types they expect.

4562:ebc2d9545634 13-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Partially implement "POP"

4545:03725ca8b7ea 12-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Add in MOV instructions.

4527:323c8068b597 08-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Fixed format arguments for XOR.

4519:f8da6b45573f 04-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Reworking x86's microcode system. This is a work in progress, and X86 doesn't compile.

src/arch/x86/isa/decoder/one_byte_opcodes.isa:
src/arch/x86/isa/macroop.isa:
src/arch/x86/isa/main.isa:
src/arch/x86/isa/microasm.isa:
src/arch/x86/isa/microops/base.isa:
src/arch/x86/isa/microops/microops.isa:
src/arch/x86/isa/operands.isa:
src/arch/x86/isa/microops/regop.isa:
src/arch/x86/isa/microops/specop.isa:
Reworking x86's microcode system

4482:7ca486cfc7a6 31-May-2007 Gabe Black <gblack@eecs.umich.edu>

x86 work that hadn't been checked in.

src/arch/x86/isa/decoder/one_byte_opcodes.isa:
Give the "MOV" instruction the format of it's arguments. This will likely need to be completely overhauled in the near future.
src/arch/x86/predecoder.cc:
src/arch/x86/predecoder.hh:
Make the predecoder explicitly reset itself rather than counting on it happening naturally.
src/arch/x86/predecoder_tables.cc:
Fix the immediate size table
src/arch/x86/regfile.cc:
nextnpc is bogus

4369:5b1ad8322f0e 10-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

Changed some instruction names to be in all caps, and "implemented" move to test the stub code for instructions.

4338:24d31b35bcf9 04-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

The process of going from an instruction definition to an instruction to be returned by the decoder has been fleshed out more. The following steps describe how an instruction implementation becomes a StaticInst.

1. Microops are created. These are StaticInsts use templates to provide a basic form of polymorphism without having to make the microassembler smarter.
2. An instruction class is created which has a "templated" microcode program as it's docstring. The template parameters are refernced with ^ following by a number.
3. An instruction in the decoder references an instruction template using it's mnemonic. The parameters to it's format end up replacing the placeholders. These parameters describe a source for an operand which could be memory, a register, or an immediate. It it's a register, the register index is used. If it's memory, eventually a load/store will be pre/postpended to the instruction template and it's destination register will be used in place of the ^. If it's an immediate, the immediate is used. Some operand types, specifically those that come from the ModRM byte, need to be decoded further into memory vs. register versions. This is accomplished by making the decode_block text for these instructions another case statement based off ModRM.
4. Once all of the template parameters have been handled, the instruction goes throw the microcode assembler which resolves labels and creates a list of python op objects. If an operand is a register, it uses a % prefix, an immediate uses $, and a label uses @. If the operand is just letters, numbers, and underscores, it can appear immediately after the prefix. If it's not, it can be encolsed in non nested {}s.
5. If there is a single "op" object (which corresponds to a single microop) the decoder is set up to return it directly. If not, a macroop wrapper is created around it.

In the future, I'm considering seperating the operand type specialization from the template substitution step. A problem this introduces is that either the template arguments need to be kept around for the specialization step, or they need to be re-extracted. Re-extraction might be the way to go so that the operand formats can be coded directly into the micro assembler template without having to pass them in as parameters. I don't know if that's actually useful, though.

src/arch/x86/isa/decoder/one_byte_opcodes.isa:
src/arch/x86/isa/microasm.isa:
src/arch/x86/isa/microops/microops.isa:
src/arch/x86/isa/operands.isa:
src/arch/x86/isa/microops/base.isa:
Implemented polymorphic microops and changed around the microcode assembler syntax.

4336:bd6ab22f8e11 04-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

Reworking how x86's isa description works. I'm adopting the following definitions to make figuring out what's what a little easier:

MicroOp: A single operation actually implemented in hardware.
MacroOp: A collection of microops which are executed as a unit.
Instruction: An architected instruction which can be implemented with a macroop or a microop.

4323:13ca4002d2ac 03-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

A batch of changes and fixes. Macroops are now generated automatically, multiops do alot more of what they're supposed to (excluding memory operands), and microops are slightly more implemented.

4310:8f9d834f19bc 29-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Made the MultiOp format do a little more. It now sets up single microop instructions to return an instance of the right class. The code to decode register numbers and generate loads and stores still needs to be added. Also, a syntax for specifying operands as sources, destinations, or both needs to be established. Multipl microop instructions are also not handled, pending real macroop generation support.

4299:8f0635157ac4 29-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Fidget with the syntax of the MultiOp format in anticipation of making it actually work.

4278:4233cadbe3c3 21-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Start implementing groups of instructions which do the same thing on different sets of inputs.

4276:f0030662ee2a 21-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Break out the one and two byte opcodes into different files. Also change what bits decode is done on to reflect where clumps of instructions are.

4275:8a37341c7507 21-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Missed a const