summaryrefslogtreecommitdiff
path: root/src/arch/x86/predecoder.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-18 00:52:45 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-18 00:52:45 -0700
commitfd45c04cad4891c6216807639482f2b2d6a7b042 (patch)
tree63dd180fab8258317559fbff99f46f456c5a765a /src/arch/x86/predecoder.cc
parenta1ea10d7bac34f022598f82873723e2dfee58625 (diff)
downloadgem5-fd45c04cad4891c6216807639482f2b2d6a7b042.tar.xz
X86: Decode three byte opcodes.
Diffstat (limited to 'src/arch/x86/predecoder.cc')
-rw-r--r--src/arch/x86/predecoder.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/arch/x86/predecoder.cc b/src/arch/x86/predecoder.cc
index f537f92af..026b733bd 100644
--- a/src/arch/x86/predecoder.cc
+++ b/src/arch/x86/predecoder.cc
@@ -195,7 +195,7 @@ namespace X86ISA
State nextState = ErrorState;
emi.opcode.num++;
//We can't handle 3+ byte opcodes right now
- assert(emi.opcode.num < 3);
+ assert(emi.opcode.num < 4);
consumeByte();
if(emi.opcode.num == 1 && nextByte == 0x0f)
{
@@ -203,11 +203,8 @@ namespace X86ISA
DPRINTF(Predecoder, "Found two byte opcode.\n");
emi.opcode.prefixA = nextByte;
}
- else if(emi.opcode.num == 2 &&
- (nextByte == 0x0f ||
- (nextByte & 0xf8) == 0x38))
+ else if(emi.opcode.num == 2 && (nextByte == 0x38 || nextByte == 0x3F))
{
- panic("Three byte opcodes aren't yet supported!\n");
nextState = OpcodeState;
DPRINTF(Predecoder, "Found three byte opcode.\n");
emi.opcode.prefixB = nextByte;