x86: simplify OP_I64()
The only meaningful difference from OP_I() is the handling of the VEX.W=1 case in 64-bit mode for bytemode being v_mode. Funnel everything else into OP_I(), and drop no longer needed local variables.
This commit is contained in:
parent
e1a1babdad
commit
a280ab8e81
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2019-06-25 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
* i386-dis.c (prefix_table): Use Edq for cvtsi2ss and cvtsi2sd.
|
* i386-dis.c (prefix_table): Use Edq for cvtsi2ss and cvtsi2sd.
|
||||||
|
@ -14788,53 +14788,16 @@ OP_I (int bytemode, int sizeflag)
|
|||||||
static void
|
static void
|
||||||
OP_I64 (int bytemode, int sizeflag)
|
OP_I64 (int bytemode, int sizeflag)
|
||||||
{
|
{
|
||||||
bfd_signed_vma op;
|
if (bytemode != v_mode || address_mode != mode_64bit || !(rex & REX_W))
|
||||||
bfd_signed_vma mask = -1;
|
|
||||||
|
|
||||||
if (address_mode != mode_64bit)
|
|
||||||
{
|
{
|
||||||
OP_I (bytemode, sizeflag);
|
OP_I (bytemode, sizeflag);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (bytemode)
|
USED_REX (REX_W);
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
op &= mask;
|
|
||||||
scratchbuf[0] = '$';
|
scratchbuf[0] = '$';
|
||||||
print_operand_value (scratchbuf + 1, 1, op);
|
print_operand_value (scratchbuf + 1, 1, get64 ());
|
||||||
oappend_maybe_intel (scratchbuf);
|
oappend_maybe_intel (scratchbuf);
|
||||||
scratchbuf[0] = '\0';
|
scratchbuf[0] = '\0';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user