diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-09-19 17:52:21 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-09-19 17:52:21 +0000 |
commit | 0f7da3979d1e0e3696266abe279fe4d549e34d61 (patch) | |
tree | 822fc47514658ea35e4fe840da4fb0fea069e6da /opcodes | |
parent | 835965e64631fe41583002282267fdfb7c614106 (diff) | |
download | gdb-0f7da3979d1e0e3696266abe279fe4d549e34d61.zip gdb-0f7da3979d1e0e3696266abe279fe4d549e34d61.tar.gz gdb-0f7da3979d1e0e3696266abe279fe4d549e34d61.tar.bz2 |
gas/testsuite/gas/
2007-09-19 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/intelok.s: Add tests for memory without base.
* gas/i386/intelok.d: Updated.
* gas/i386/intelok.e: Likewise.
opcodes/
2007-09-19 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (OP_E_extended): Always display scale for memory.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 9 |
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'; |