summaryrefslogtreecommitdiff
path: root/src/arch/x86/predecoder.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-06-20 19:06:08 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-06-20 19:06:08 +0000
commitc4ebfa850e141ae7b33184f061874f9576bf5a54 (patch)
treefac78ac76e3b4493640c7ddb346c809cac0d8e36 /src/arch/x86/predecoder.cc
parenta19f1c40145ebc8dec66f888c82ac92bfd05d28e (diff)
downloadgem5-c4ebfa850e141ae7b33184f061874f9576bf5a54.tar.xz
Fix a newly introduced bug where the predecoder wasn't picking up all the displacement.
--HG-- extra : convert_revision : 9202c11ee187458adcd85ba616b7f7f4bdd4eec1
Diffstat (limited to 'src/arch/x86/predecoder.cc')
-rw-r--r--src/arch/x86/predecoder.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/x86/predecoder.cc b/src/arch/x86/predecoder.cc
index bbbad7dd0..49f76699b 100644
--- a/src/arch/x86/predecoder.cc
+++ b/src/arch/x86/predecoder.cc
@@ -277,7 +277,8 @@ namespace X86ISA
displacementSize = 0;
} else {
//figure out 32/64 bit displacement size
- if(modRM.mod == 0 && modRM.rm == 4 || modRM.mod == 2)
+ if(modRM.mod == 0 && (modRM.rm == 4 || modRM.rm == 5)
+ || modRM.mod == 2)
displacementSize = 4;
else if(modRM.mod == 1)
displacementSize = 1;