aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/i386-dis.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 2fea362..1434860 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (OP_E_extended): Always display scale for memory.
+
2007-09-17 H.J. Lu <hongjiu.lu@intel.com>
* i386-opc.h (RegRip): New.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 82b2bcb..19b13d0 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -6303,12 +6303,14 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
int havedisp;
int havesib;
int havebase;
+ int haveindex;
int base;
int index = 0;
int scale = 0;
havesib = 0;
havebase = 1;
+ haveindex = 0;
base = modrm.rm;
if (base == 4)
@@ -6323,6 +6325,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
USED_REX (REX_X);
if (rex & REX_X)
index += 8;
+ haveindex = index != 4;
codep++;
}
base += add;
@@ -6357,7 +6360,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
break;
}
- havedisp = havebase || (havesib && (index != 4 || scale != 0));
+ havedisp = havebase || (havesib && (haveindex || scale != 0));
if (!intel_syntax)
if (modrm.mod != 0 || (base & 7) == 5)
@@ -6388,7 +6391,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
? names64[base] : names32[base]);
if (havesib)
{
- if (index != 4)
+ if (haveindex)
{
if (!intel_syntax || havebase)
{
@@ -6399,7 +6402,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
&& (sizeflag & AFLAG)
? names64[index] : names32[index]);
}
- if (scale != 0 || (!intel_syntax && index != 4))
+ if (scale != 0 || haveindex)
{
*obufp++ = scale_char;
*obufp = '\0';