aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-01-24 15:11:35 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-01-24 15:11:35 +0000
commit82c18208b8100ecd9790494d312c419a03f36eb7 (patch)
tree8081baca5e7b6d8e1eb7929f770471e3d6662b5e /opcodes
parentdd6be23411f9494c8f4b4067e6047079cefc9630 (diff)
downloadgdb-82c18208b8100ecd9790494d312c419a03f36eb7.zip
gdb-82c18208b8100ecd9790494d312c419a03f36eb7.tar.gz
gdb-82c18208b8100ecd9790494d312c419a03f36eb7.tar.bz2
gas/testsuite/
2008-01-24 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/x86-64-sib.s: Add tests for r12. * gas/i386/x86-64-sib-intel.d: Updated. * gas/i386/x86-64-sib.d: Likewise. opcodes/ 2008-01-24 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (OP_E_extended): Handle r12 like rsp.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/i386-dis.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 81b4003..92d72fe 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (OP_E_extended): Handle r12 like rsp.
+
2008-01-23 H.J. Lu <hongjiu.lu@intel.com>
* i386-gen.c (cpu_flag_init): Add CpuLM to CPU_GENERIC64_FLAGS.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index d237b62..4f14a32 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -6645,7 +6645,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
int havebase;
int haveindex;
int needindex;
- int base;
+ int base, rbase;
int index = 0;
int scale = 0;
@@ -6667,7 +6667,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
haveindex = index != 4;
codep++;
}
- base += add;
+ rbase = base + add;
/* If we have a DREX byte, skip it now
(it has already been handled) */
@@ -6680,7 +6680,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
switch (modrm.mod)
{
case 0:
- if ((base & 7) == 5)
+ if (base == 5)
{
havebase = 0;
if (address_mode == mode_64bit && !havesib)
@@ -6710,7 +6710,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
|| (havesib && (haveindex || scale != 0)));
if (!intel_syntax)
- if (modrm.mod != 0 || (base & 7) == 5)
+ if (modrm.mod != 0 || base == 5)
{
if (havedisp || riprel)
print_displacement (scratchbuf, disp);
@@ -6738,7 +6738,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
*obufp = '\0';
if (havebase)
oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
- ? names64[base] : names32[base]);
+ ? names64[rbase] : names32[rbase]);
if (havesib)
{
/* ESP/RSP won't allow index. If base isn't ESP/RSP,
@@ -6769,7 +6769,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
}
}
if (intel_syntax
- && (disp || modrm.mod != 0 || (base & 7) == 5))
+ && (disp || modrm.mod != 0 || base == 5))
{
if (!havedisp || (bfd_signed_vma) disp >= 0)
{
@@ -6795,7 +6795,7 @@ OP_E_extended (int bytemode, int sizeflag, int has_drex)
}
else if (intel_syntax)
{
- if (modrm.mod != 0 || (base & 7) == 5)
+ if (modrm.mod != 0 || base == 5)
{
if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
| PREFIX_ES | PREFIX_FS | PREFIX_GS))