summaryrefslogtreecommitdiff
path: root/src/arch/x86/predecoder_tables.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-04-06 15:19:23 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-04-06 15:19:23 +0000
commit75e8838ba4020a03f53b66488ecfc756112b2861 (patch)
treea333e1daf3eee99b99c739facc33f402265a9846 /src/arch/x86/predecoder_tables.cc
parente633e23a3ab32dda963746bea43147d54599c01c (diff)
downloadgem5-75e8838ba4020a03f53b66488ecfc756112b2861.tar.xz
Clean up the code a little, fix (I think) a perceived problem with immediate sizes, and sign extend the 32-bit-acting-like-64-bit-immediates.
--HG-- extra : convert_revision : e59b747198cc79d50045bd2dc45b2e2b97bbffcc
Diffstat (limited to 'src/arch/x86/predecoder_tables.cc')
-rw-r--r--src/arch/x86/predecoder_tables.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/arch/x86/predecoder_tables.cc b/src/arch/x86/predecoder_tables.cc
index f233ad234..38b9c57a3 100644
--- a/src/arch/x86/predecoder_tables.cc
+++ b/src/arch/x86/predecoder_tables.cc
@@ -141,7 +141,7 @@ namespace X86ISA
}
};
- enum ImmediateTypes {
+ enum SizeType {
NoImm,
NI = NoImm,
ByteImm,
@@ -158,19 +158,19 @@ namespace X86ISA
VW = VWordImm,
ZWordImm,
ZW = ZWordImm,
- Pointer,
- PO = Pointer,
//The enter instruction takes -2- immediates for a total of 3 bytes
Enter,
- EN = Enter
+ EN = Enter,
+ Pointer,
+ PO = Pointer
};
- const uint8_t Predecoder::ImmediateTypeToSize[3][10] =
+ const uint8_t Predecoder::SizeTypeToSize[3][10] =
{
-// noimm byte word dword qword oword vword zword enter
- {0, 1, 2, 4, 8, 16, 2, 2, 3, 4}, //16 bit
- {0, 1, 2, 4, 8, 16, 4, 4, 3, 6}, //32 bit
- {0, 1, 2, 4, 8, 16, 4, 8, 3, 0} //64 bit
+// noimm byte word dword qword oword vword zword enter pointer
+ {0, 1, 2, 4, 8, 16, 2, 2, 3, 4 }, //16 bit
+ {0, 1, 2, 4, 8, 16, 4, 4, 3, 6 }, //32 bit
+ {0, 1, 2, 4, 8, 16, 4, 8, 3, 0 } //64 bit
};
//This table determines the immediate type. The first index is the