summaryrefslogtreecommitdiff
path: root/src/arch/x86/predecoder.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-07-22 10:40:45 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2007-07-22 10:40:45 -0400
commit03730edc45e2e00bdec58dabc84e94c632634a1a (patch)
treeaffdbffcb174a9cfc0de933f3c240ae5f2813292 /src/arch/x86/predecoder.hh
parent658eeee50715d9fd334ae3fd3e0e21b6db6de0c4 (diff)
parent2cd454d102b5da828b0fbf4b66ef1a24875e69f6 (diff)
downloadgem5-03730edc45e2e00bdec58dabc84e94c632634a1a.tar.xz
Merge Gabe's changes with mine.
--HG-- extra : convert_revision : f50ed42e7acb3f11e610fd6976eaa8df0c6ba2ab
Diffstat (limited to 'src/arch/x86/predecoder.hh')
-rw-r--r--src/arch/x86/predecoder.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/arch/x86/predecoder.hh b/src/arch/x86/predecoder.hh
index f34b66364..450ebd79b 100644
--- a/src/arch/x86/predecoder.hh
+++ b/src/arch/x86/predecoder.hh
@@ -106,13 +106,13 @@ namespace X86ISA
toGet = toGet > remaining ? remaining : toGet;
//Shift the bytes we want to be all the way to the right
- uint64_t partialDisp = fetchChunk >> (offset * 8);
+ uint64_t partialImm = fetchChunk >> (offset * 8);
//Mask off what we don't want
- partialDisp &= mask(toGet * 8);
+ partialImm &= mask(toGet * 8);
//Shift it over to overlay with our displacement.
- partialDisp <<= (displacementCollected * 8);
+ partialImm <<= (immediateCollected * 8);
//Put it into our displacement
- current |= partialDisp;
+ current |= partialImm;
//Update how many bytes we've collected.
collected += toGet;
consumeBytes(toGet);
@@ -144,9 +144,10 @@ namespace X86ISA
bool emiIsReady;
//The size of the displacement value
int displacementSize;
- int displacementCollected;
//The size of the immediate value
int immediateSize;
+ //This is how much of any immediate value we've gotten. This is used
+ //for both the actual immediate and the displacement.
int immediateCollected;
enum State {