diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-01-19 10:17:44 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-01-19 10:17:44 +0100 |
commit | 2519809009ed5e250ad9ed9b6184d9c45dba5029 (patch) | |
tree | 8d9c351d9814ff334bd58f74bea49c3ff2adf6ca /opcodes | |
parent | 4945a0c46c5562dfdaa9ebbb1ce407fc1a7e4b40 (diff) | |
download | binutils-2519809009ed5e250ad9ed9b6184d9c45dba5029.zip binutils-2519809009ed5e250ad9ed9b6184d9c45dba5029.tar.gz binutils-2519809009ed5e250ad9ed9b6184d9c45dba5029.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.c | 10 |
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) |