summaryrefslogtreecommitdiff
path: root/src/arch/x86/insts/microldstop.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-16 09:29:29 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-16 09:29:29 -0700
commitba6b8389ee72e17a6b966f2af24e80b2cff83e48 (patch)
treebb6ead4503f4b0fb5bd9e086799ccea18724d149 /src/arch/x86/insts/microldstop.hh
parent80c834ccac0b92cccd9756d4a2ec4cd4b46b6711 (diff)
downloadgem5-ba6b8389ee72e17a6b966f2af24e80b2cff83e48.tar.xz
X86: Take limitted advantage of the compilers type checking for microop operands.
Diffstat (limited to 'src/arch/x86/insts/microldstop.hh')
-rw-r--r--src/arch/x86/insts/microldstop.hh15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/arch/x86/insts/microldstop.hh b/src/arch/x86/insts/microldstop.hh
index ec9cb52b3..309a2e6b7 100644
--- a/src/arch/x86/insts/microldstop.hh
+++ b/src/arch/x86/insts/microldstop.hh
@@ -93,20 +93,21 @@ namespace X86ISA
LdStOp(ExtMachInst _machInst,
const char * mnem, const char * _instMnem,
bool isMicro, bool isDelayed, bool isFirst, bool isLast,
- uint8_t _scale, RegIndex _index, RegIndex _base,
- uint64_t _disp, uint8_t _segment,
- RegIndex _data,
+ 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),
- scale(_scale), index(_index), base(_base),
- disp(_disp), segment(_segment),
- data(_data),
+ scale(_scale), index(_index.idx), base(_base.idx),
+ disp(_disp), segment(_segment.idx),
+ data(_data.idx),
dataSize(_dataSize), addressSize(_addressSize),
- memFlags(_memFlags | _segment)
+ memFlags(_memFlags | _segment.idx)
{
+ assert(_segment.idx < NUM_SEGMENTREGS);
foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
foldABit =
(addressSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;