aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-01-19 10:17:44 +0100
committerJan Beulich <jbeulich@suse.com>2024-01-19 13:25:35 +0100
commit03e43c3ecdd7147e136fef92471d0b595b419b5b (patch)
treedd2730b2d74f87152d16da1418bbb1886bec7c56 /opcodes
parenteabdfeb103570aa6dafa95673dff00af25d9f983 (diff)
downloadfsf-binutils-gdb-03e43c3ecdd7147e136fef92471d0b595b419b5b.zip
fsf-binutils-gdb-03e43c3ecdd7147e136fef92471d0b595b419b5b.tar.gz
fsf-binutils-gdb-03e43c3ecdd7147e136fef92471d0b595b419b5b.tar.bz2
x86/APX: be consistent with insn suffixes
When there's a suitably disambiguating register operand, suffixes are generally omitted (unless in suffix-always mode). All NDD insns have a suitable register operand, so they shouldn't have suffixes by default.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-dis.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index f2c7959..6b154ab 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1769,7 +1769,7 @@ struct dis386 {
};
/* Upper case letters in the instruction names here are macros.
- 'A' => print 'b' if no register operands or suffix_always is true
+ 'A' => print 'b' if no (suitable) register operand or suffix_always is true
'B' => print 'b' if suffix_always is true
'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
size prefix
@@ -1788,8 +1788,8 @@ struct dis386 {
'O' => print 'd' or 'o' (or 'q' in Intel mode)
'P' => behave as 'T' except with register operand outside of suffix_always
mode
- 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
- is true
+ 'Q' => print 'w', 'l' or 'q' if no (suitable) register operand or
+ suffix_always is true
'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
'S' => print 'w', 'l' or 'q' if suffix_always is true
'T' => print 'w', 'l'/'d', or 'q' if instruction has an operand size
@@ -10416,7 +10416,7 @@ putop (instr_info *ins, const char *in_template, int sizeflag)
case 'A':
if (ins->intel_syntax)
break;
- if ((ins->need_modrm && ins->modrm.mod != 3)
+ if ((ins->need_modrm && ins->modrm.mod != 3 && !ins->vex.nd)
|| (sizeflag & SUFFIX_ALWAYS))
*ins->obufp++ = 'b';
break;
@@ -10715,7 +10715,7 @@ putop (instr_info *ins, const char *in_template, int sizeflag)
if (ins->intel_syntax && !alt)
break;
USED_REX (REX_W);
- if ((ins->need_modrm && ins->modrm.mod != 3)
+ if ((ins->need_modrm && ins->modrm.mod != 3 && !ins->vex.nd)
|| (sizeflag & SUFFIX_ALWAYS))
{
if (ins->rex & REX_W)