summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-02-27 09:26:09 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-02-27 09:26:09 -0800
commit27b751ec46e59166867cedbf6da3ee19453671bd (patch)
tree9630142ea6f6f9666ad1ff04528347ea9ec90507 /src/arch
parentaa51c01d697124fac654b3e87a99bb2d613cae72 (diff)
downloadgem5-27b751ec46e59166867cedbf6da3ee19453671bd.tar.xz
X86: Don't treat the REX prefixes as prefixes in 32 bit modes. These are inc/dec instructions.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/predecoder.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arch/x86/predecoder.cc b/src/arch/x86/predecoder.cc
index 9d60089e3..620ab89ea 100644
--- a/src/arch/x86/predecoder.cc
+++ b/src/arch/x86/predecoder.cc
@@ -136,7 +136,10 @@ namespace X86ISA
{
uint8_t prefix = Prefixes[nextByte];
State nextState = PrefixState;
- if(prefix)
+ // REX prefixes are only recognized in 64 bit mode.
+ if (prefix == RexPrefix && emi.mode.submode != SixtyFourBitMode)
+ prefix = 0;
+ if (prefix)
consumeByte();
switch(prefix)
{