History log of /gem5/src/arch/x86/isa/microops/base.isa
Revision Date Author Comments
# 12407:c24d0c2d816d 20-Dec-2017 Gabe Black <gabeblack@google.com>

riscv,x86: Stop using the arch Nop machine instruction unnecessarily.

That particular ExtMachInst is a convenient placeholder, but a value
of 0 in RISCV or a static uninitialized ExtMachInst (which will
therefore be all zeroes) on x86 works just as well, and removes the
need for an ISA specific constant.

Also, the idea of a universal Nop doesn't always make sense since it
could be that what, exactly, doesn't do anything depends on context
which would be lost on a constant value of an ExtMachInst. For
instance, the value of an ExtMachInst that makes sense might depend on
what mode the CPU was in, etc.

Change-Id: I1f1a43a5c607a667e11b79bcf6e059e4f7141b3f
Reviewed-on: https://gem5-review.googlesource.com/6825
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Alec Roelke <ar4jc@virginia.edu>
Maintainer: Gabe Black <gabeblack@google.com>


# 11320:42ecb523c64a 06-Feb-2016 Steve Reinhardt <steve.reinhardt@amd.com>

style: remove trailing whitespace

Result of running 'hg m5style --skip-all --fix-white -a'.


# 8607:5fb918115c07 31-Oct-2011 Gabe Black <gblack@eecs.umich.edu>

GCC: Get everything working with gcc 4.6.1.

And by "everything" I mean all the quick regressions.


# 7620:3d8a23caa1ef 23-Aug-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Consolidate extra microop flags into one parameter.

This single parameter replaces the collection of bools that set up various
flavors of microops. A flag parameter also allows other flags to be set like
the serialize before/after flags, etc., without having to change the
constructor.


# 7571:405f840c4ae1 22-Aug-2010 Gabe Black <gblack@eecs.umich.edu>

X86: Get rid of the unused getAllocator on the python base microop class.

This function is always overridden, and doesn't actually have the right
signature.


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

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


# 6345:f9ae7c3a036c 16-Jul-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Take limitted advantage of the compilers type checking for microop operands.


# 5788:6d4161a36ca1 07-Jan-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Autogenerate macroop generateDisassemble function.


# 5692:0d6addcde185 13-Oct-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Set the delayed commit flag in x86 microops appropriately.


# 5667:78b94954f66a 12-Oct-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Create a handy way to access labels from the ROM in microcode.


# 5666:e7925fa8f0d6 12-Oct-2008 Gabe Black <gblack@eecs.umich.edu>

X86: Make X86's microcode ROM actually do something.


# 5083:49559a8060e8 19-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Move the fp microops to their own file with their own base classes in C++ and python.


# 5040:126e4510b5bb 01-Sep-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Major rework of how regop microops are generated.
The new implementation uses metaclass, and gives a lot more precise control
with a lot less verbosity. The flags/no flags reg/imm variants are all handled
by the same python class now which supplies a constructor to the right C++
class based on context.


# 4679:0b39fa8f5eb8 14-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Pull some hard coded base classes out of the isa description.


# 4561:ade4960f0832 13-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Move load/store microops into their own file. They still don't do anything, though.


# 4539:6eeeea62b7c4 12-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Make microOp vs microop and macroOp vs macroop capitilization consistent.

src/arch/x86/isa/macroop.isa:
Make microOp vs microop and macroOp vs macroop capitilization consistent. Also fill out the emulation environment handling a little more, and use an object to pass around output code.
src/arch/x86/isa/microops/base.isa:
Make microOp vs microop and macroOp vs macroop capitilization consistent. Also adjust python to C++ bool translation.


# 4534:7035ff1aa521 08-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Fix the formatting on a comment.


# 4524:f051dcff22b3 04-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Make limm (load immediate) microop


# 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


# 4371:c5003760793e 10-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

Reworked x86 a bit


# 4344:174e31456abe 06-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

Consolidated the microcode assembler to help separate it from more x86-centric stuff.


# 4343:3f11bcf873b3 06-Apr-2007 Gabe Black <gblack@eecs.umich.edu>

Refactored the x86 isa description some more. There should be more seperation between x86 specific parts, and those parts which are implemented in the isa description but could eventually be moved elsewhere.


# 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.