diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-08-23 09:44:19 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-08-23 09:44:19 -0700 |
commit | 5a1dbe4d99e9aad0f5c9002707a323ef8d6dfb8a (patch) | |
tree | c320a60e68034355a52afaef171ade75f9914d7a /src/arch/x86/insts | |
parent | b187e7c9cc025dbd5bc525de3ef9352219007f72 (diff) | |
download | gem5-5a1dbe4d99e9aad0f5c9002707a323ef8d6dfb8a.tar.xz |
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.
Diffstat (limited to 'src/arch/x86/insts')
-rw-r--r-- | src/arch/x86/insts/microfpop.hh | 6 | ||||
-rw-r--r-- | src/arch/x86/insts/microldstop.hh | 5 | ||||
-rw-r--r-- | src/arch/x86/insts/micromediaop.hh | 21 | ||||
-rw-r--r-- | src/arch/x86/insts/microop.hh | 9 | ||||
-rw-r--r-- | src/arch/x86/insts/microregop.hh | 21 |
5 files changed, 18 insertions, 44 deletions
diff --git a/src/arch/x86/insts/microfpop.hh b/src/arch/x86/insts/microfpop.hh index d7b0073dc..15638e6b4 100644 --- a/src/arch/x86/insts/microfpop.hh +++ b/src/arch/x86/insts/microfpop.hh @@ -60,13 +60,11 @@ namespace X86ISA // Constructor FpOp(ExtMachInst _machInst, const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + uint64_t setFlags, InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest, uint8_t _dataSize, int8_t _spm, OpClass __opClass) : - X86MicroopBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + X86MicroopBase(_machInst, mnem, _instMnem, setFlags, __opClass), src1(_src1.idx), src2(_src2.idx), dest(_dest.idx), dataSize(_dataSize), spm(_spm) diff --git a/src/arch/x86/insts/microldstop.hh b/src/arch/x86/insts/microldstop.hh index d52e11728..18771f9a6 100644 --- a/src/arch/x86/insts/microldstop.hh +++ b/src/arch/x86/insts/microldstop.hh @@ -74,15 +74,14 @@ namespace X86ISA //Constructor LdStOp(ExtMachInst _machInst, const char * mnem, const char * _instMnem, - bool isMicro, bool isDelayed, bool isFirst, bool isLast, + uint64_t setFlags, uint8_t _scale, InstRegIndex _index, InstRegIndex _base, uint64_t _disp, InstRegIndex _segment, InstRegIndex _data, uint8_t _dataSize, uint8_t _addressSize, Request::FlagsType _memFlags, OpClass __opClass) : - X86MicroopBase(machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, __opClass), + X86MicroopBase(machInst, mnem, _instMnem, setFlags, __opClass), scale(_scale), index(_index.idx), base(_base.idx), disp(_disp), segment(_segment.idx), data(_data.idx), diff --git a/src/arch/x86/insts/micromediaop.hh b/src/arch/x86/insts/micromediaop.hh index 854d4de09..cedd16820 100644 --- a/src/arch/x86/insts/micromediaop.hh +++ b/src/arch/x86/insts/micromediaop.hh @@ -53,14 +53,11 @@ namespace X86ISA // Constructor MediaOpBase(ExtMachInst _machInst, - const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + const char *mnem, const char *_instMnem, uint64_t setFlags, InstRegIndex _src1, InstRegIndex _dest, uint8_t _srcSize, uint8_t _destSize, uint8_t _ext, OpClass __opClass) : - X86MicroopBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + X86MicroopBase(_machInst, mnem, _instMnem, setFlags, __opClass), src1(_src1.idx), dest(_dest.idx), srcSize(_srcSize), destSize(_destSize), ext(_ext) @@ -98,14 +95,11 @@ namespace X86ISA // Constructor MediaOpReg(ExtMachInst _machInst, - const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + const char *mnem, const char *_instMnem, uint64_t setFlags, InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest, uint8_t _srcSize, uint8_t _destSize, uint8_t _ext, OpClass __opClass) : - MediaOpBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + MediaOpBase(_machInst, mnem, _instMnem, setFlags, _src1, _dest, _srcSize, _destSize, _ext, __opClass), src2(_src2.idx) @@ -122,14 +116,11 @@ namespace X86ISA // Constructor MediaOpImm(ExtMachInst _machInst, - const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + const char *mnem, const char *_instMnem, uint64_t setFlags, InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest, uint8_t _srcSize, uint8_t _destSize, uint8_t _ext, OpClass __opClass) : - MediaOpBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + MediaOpBase(_machInst, mnem, _instMnem, setFlags, _src1, _dest, _srcSize, _destSize, _ext, __opClass), imm8(_imm8) diff --git a/src/arch/x86/insts/microop.hh b/src/arch/x86/insts/microop.hh index 995b7a243..9b0497efc 100644 --- a/src/arch/x86/insts/microop.hh +++ b/src/arch/x86/insts/microop.hh @@ -96,16 +96,11 @@ namespace X86ISA X86MicroopBase(ExtMachInst _machInst, const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, - OpClass __opClass) : + uint64_t setFlags, OpClass __opClass) : X86ISA::X86StaticInst(mnem, _machInst, __opClass), instMnem(_instMnem) { - flags[IsMicroop] = isMicro; - flags[IsDelayedCommit] = isDelayed; - flags[IsFirstMicroop] = isFirst; - flags[IsLastMicroop] = isLast; + flags |= setFlags; } std::string generateDisassembly(Addr pc, diff --git a/src/arch/x86/insts/microregop.hh b/src/arch/x86/insts/microregop.hh index ce59a259c..1f4eb3981 100644 --- a/src/arch/x86/insts/microregop.hh +++ b/src/arch/x86/insts/microregop.hh @@ -58,14 +58,11 @@ namespace X86ISA // Constructor RegOpBase(ExtMachInst _machInst, - const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + const char *mnem, const char *_instMnem, uint64_t setFlags, InstRegIndex _src1, InstRegIndex _dest, uint8_t _dataSize, uint16_t _ext, OpClass __opClass) : - X86MicroopBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + X86MicroopBase(_machInst, mnem, _instMnem, setFlags, __opClass), src1(_src1.idx), dest(_dest.idx), dataSize(_dataSize), ext(_ext) @@ -86,14 +83,11 @@ namespace X86ISA // Constructor RegOp(ExtMachInst _machInst, - const char *mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + const char *mnem, const char *_instMnem, uint64_t setFlags, InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest, uint8_t _dataSize, uint16_t _ext, OpClass __opClass) : - RegOpBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + RegOpBase(_machInst, mnem, _instMnem, setFlags, _src1, _dest, _dataSize, _ext, __opClass), src2(_src2.idx) @@ -111,14 +105,11 @@ namespace X86ISA // Constructor RegOpImm(ExtMachInst _machInst, - const char * mnem, const char *_instMnem, - bool isMicro, bool isDelayed, - bool isFirst, bool isLast, + const char * mnem, const char *_instMnem, uint64_t setFlags, InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest, uint8_t _dataSize, uint16_t _ext, OpClass __opClass) : - RegOpBase(_machInst, mnem, _instMnem, - isMicro, isDelayed, isFirst, isLast, + RegOpBase(_machInst, mnem, _instMnem, setFlags, _src1, _dest, _dataSize, _ext, __opClass), imm8(_imm8) |