diff options
author | Jan Beulich <jbeulich@suse.com> | 2019-11-07 09:28:20 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2019-11-07 09:28:20 +0100 |
commit | 081e283fafb415b4e37f2ac1d5f945ad0b61e282 (patch) | |
tree | 76facc35196d84a1f766f105adfd41f6349528d9 /opcodes/i386-dis.c | |
parent | x86/Intel: drop IgnoreSize from operand-less MOVSD/CMPSD again (diff) | |
download | binutils-gdb-081e283fafb415b4e37f2ac1d5f945ad0b61e282.tar.gz binutils-gdb-081e283fafb415b4e37f2ac1d5f945ad0b61e282.tar.bz2 binutils-gdb-081e283fafb415b4e37f2ac1d5f945ad0b61e282.zip |
x86: adjust register names printed for MONITOR/MWAIT
As the comments (here: almost, in the opcode table: fully) correctly
state - all register operands except MONITOR's address one are fixed
at 32 bit size. Don't print 64-bit registers there.
Also adjust x86-64-suffix.d's name such that it wouldn't be identical to
x86-64-rep-suffix.d's, but instead resemble that of its sibling
x86-64-suffix-intel.d.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 0f4a844dce7..7f66b7f693e 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -15520,12 +15520,10 @@ OP_Mwait (int bytemode, int sizeflag ATTRIBUTE_UNUSED) /* mwait %eax,%ecx / mwaitx %eax,%ecx,%ebx */ if (!intel_syntax) { - const char **names = (address_mode == mode_64bit - ? names64 : names32); - strcpy (op_out[0], names[0]); - strcpy (op_out[1], names[1]); + strcpy (op_out[0], names32[0]); + strcpy (op_out[1], names32[1]); if (bytemode == eBX_reg) - strcpy (op_out[2], names[3]); + strcpy (op_out[2], names32[3]); two_source_ops = 1; } /* Skip mod/rm byte. */ @@ -15537,27 +15535,25 @@ static void OP_Monitor (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { - /* monitor %eax,%ecx,%edx" */ + /* monitor %{e,r,}ax,%ecx,%edx" */ if (!intel_syntax) { - const char **op1_names; const char **names = (address_mode == mode_64bit ? names64 : names32); - if (!(prefixes & PREFIX_ADDR)) - op1_names = (address_mode == mode_16bit - ? names16 : names); - else + if (prefixes & PREFIX_ADDR) { /* Remove "addr16/addr32". */ all_prefixes[last_addr_prefix] = 0; - op1_names = (address_mode != mode_32bit - ? names32 : names16); + names = (address_mode != mode_32bit + ? names32 : names16); used_prefixes |= PREFIX_ADDR; } - strcpy (op_out[0], op1_names[0]); - strcpy (op_out[1], names[1]); - strcpy (op_out[2], names[2]); + else if (address_mode == mode_16bit) + names = names16; + strcpy (op_out[0], names[0]); + strcpy (op_out[1], names32[1]); + strcpy (op_out[2], names32[2]); two_source_ops = 1; } /* Skip mod/rm byte. */ |