summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2006-12-14 20:13:28 +0000
committerH.J. Lu <hjl@lucon.org>2006-12-14 20:13:28 +0000
commit97e06bcbfdc35ea429745e886c59b9ccec4623e5 (patch)
tree76f7538a307f36b75d72189279339e21eaf27f14 /opcodes
parentfe9c50c67f9a484e6f602ebff1942c9a91241458 (diff)
downloadbinutils-redhat-97e06bcbfdc35ea429745e886c59b9ccec4623e5.tar.gz
gas/testsuite/
2006-12-14 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/x86-64-inval.s: Add cmpxchg16b. * gas/i386/x86_64.s: Likewise. * gas/i386/x86-64-inval.l: Updated. * gas/i386/x86_64.d: Likewise. opcodes/ 2006-12-14 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (CMPXCHG8B_Fixup): New. (grps): Use CMPXCHG8B_Fixup for cmpxchg8b.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-dis.c17
2 files changed, 21 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 97fcec5168..9bebc480cd 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (CMPXCHG8B_Fixup): New.
+ (grps): Use CMPXCHG8B_Fixup for cmpxchg8b.
+
2006-12-11 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (Eq): Replaced by ...
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 8b6f532aab..009d0f6358 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -104,6 +104,7 @@ static void INVLPG_Fixup (int, int);
static void BadOp (void);
static void VMX_Fixup (int, int);
static void REP_Fixup (int, int);
+static void CMPXCHG8B_Fixup (int, int);
struct dis_private {
/* Points to first byte not fetched. */
@@ -1638,7 +1639,7 @@ static const struct dis386 grps[][8] = {
/* GRP9 */
{
{ "(bad)", XX, XX, XX, XX },
- { "cmpxchg8b", Mq, XX, XX, XX },
+ { "cmpxchg8b", CMPXCHG8B_Fixup, q_mode, XX, XX, XX },
{ "(bad)", XX, XX, XX, XX },
{ "(bad)", XX, XX, XX, XX },
{ "(bad)", XX, XX, XX, XX },
@@ -5767,3 +5768,17 @@ REP_Fixup (int bytemode, int sizeflag)
break;
}
}
+
+static void
+CMPXCHG8B_Fixup (int bytemode, int sizeflag)
+{
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ {
+ /* Change cmpxchg8b to cmpxchg16b. */
+ char *p = obuf + strlen (obuf) - 2;
+ strcpy (p, "16b");
+ bytemode = x_mode;
+ }
+ OP_M (bytemode, sizeflag);
+}