aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-dis.c43
2 files changed, 8 insertions, 40 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index e02fd08..78a8792 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,10 @@
2019-06-25 Jan Beulich <jbeulich@suse.com>
+ * i386-dis.c (OP_I64): Forword more cases to OP_I(). Drop local
+ variables.
+
+2019-06-25 Jan Beulich <jbeulich@suse.com>
+
* i386-dis.c (prefix_table): Use Edq for cvtsi2ss and cvtsi2sd.
Use Gdq for cvttss2si, cvttsd2si, cvtss2si, and cvtsd2si, and
movnti.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index f7d9641..b9527ae 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -14788,53 +14788,16 @@ OP_I (int bytemode, int sizeflag)
static void
OP_I64 (int bytemode, int sizeflag)
{
- bfd_signed_vma op;
- bfd_signed_vma mask = -1;
-
- if (address_mode != mode_64bit)
+ if (bytemode != v_mode || address_mode != mode_64bit || !(rex & REX_W))
{
OP_I (bytemode, sizeflag);
return;
}
- switch (bytemode)
- {
- case b_mode:
- FETCH_DATA (the_info, codep + 1);
- op = *codep++;
- mask = 0xff;
- break;
- case v_mode:
- USED_REX (REX_W);
- if (rex & REX_W)
- op = get64 ();
- else
- {
- if (sizeflag & DFLAG)
- {
- op = get32 ();
- mask = 0xffffffff;
- }
- else
- {
- op = get16 ();
- mask = 0xfffff;
- }
- used_prefixes |= (prefixes & PREFIX_DATA);
- }
- break;
- case w_mode:
- mask = 0xfffff;
- op = get16 ();
- break;
- default:
- oappend (INTERNAL_DISASSEMBLER_ERROR);
- return;
- }
+ USED_REX (REX_W);
- op &= mask;
scratchbuf[0] = '$';
- print_operand_value (scratchbuf + 1, 1, op);
+ print_operand_value (scratchbuf + 1, 1, get64 ());
oappend_maybe_intel (scratchbuf);
scratchbuf[0] = '\0';
}