summaryrefslogtreecommitdiff
path: root/src/arch/x86/types.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-03 11:01:40 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-03 11:01:40 -0700
commit676dc6d29287e15cb37b367a15a2e7c64f9c9007 (patch)
tree6339af0073a661fa22bb18c3a129a8ae9dc39f69 /src/arch/x86/types.hh
parent38c2af17a557e5b7420a2ad15b13316acbde588d (diff)
downloadgem5-676dc6d29287e15cb37b367a15a2e7c64f9c9007.tar.xz
X86: Fix segment override prefixes on instructions that use rbp/rsp and a displacement.
Diffstat (limited to 'src/arch/x86/types.hh')
-rw-r--r--src/arch/x86/types.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/arch/x86/types.hh b/src/arch/x86/types.hh
index bdf3a814e..956ec3216 100644
--- a/src/arch/x86/types.hh
+++ b/src/arch/x86/types.hh
@@ -175,6 +175,8 @@ namespace X86ISA
uint8_t addrSize;
//The effective stack size.
uint8_t stackSize;
+ //The size of the displacement
+ uint8_t dispSize;
//Mode information
OperatingMode mode;
@@ -187,12 +189,13 @@ namespace X86ISA
"op = {\n\t\tnum = %d,\n\t\top = %#x,\n\t\t"
"prefixA = %#x,\n\t\tprefixB = %#x\n\t},\n\t"
"modRM = %#x,\n\tsib = %#x,\n\t"
- "immediate = %#x,\n\tdisplacement = %#x\n}\n",
+ "immediate = %#x,\n\tdisplacement = %#x\n\t"
+ "dispSize = %d}\n",
(uint8_t)emi.legacy, (uint8_t)emi.rex,
emi.opcode.num, (uint8_t)emi.opcode.op,
emi.opcode.prefixA, emi.opcode.prefixB,
(uint8_t)emi.modRM, (uint8_t)emi.sib,
- emi.immediate, emi.displacement);
+ emi.immediate, emi.displacement, emi.dispSize);
return os;
}
@@ -227,6 +230,8 @@ namespace X86ISA
return false;
if(emi1.stackSize != emi2.stackSize)
return false;
+ if(emi1.dispSize != emi2.dispSize)
+ return false;
return true;
}