aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-03-15 10:29:35 +0100
committerJan Beulich <jbeulich@suse.com>2024-03-15 10:29:35 +0100
commit9fe07b7f95fbfdaf34d5b69e6d73cae000b43eea (patch)
tree86a6fb610ad8e93edf50f4f280769b4342a7d76c /opcodes
parent7bb2b9493317714cae731a03828cb97ac74e849f (diff)
downloadgdb-9fe07b7f95fbfdaf34d5b69e6d73cae000b43eea.zip
gdb-9fe07b7f95fbfdaf34d5b69e6d73cae000b43eea.tar.gz
gdb-9fe07b7f95fbfdaf34d5b69e6d73cae000b43eea.tar.bz2
x86/APX: legacy promoted insns can't access %xmm16-%xmm31
Irrespective of the encoding being EVEX, the usable SIMD register range continues to be limited to %xmm0-%xmm15. Enforce this in gas (but continue to generate code, as in principle we know how to encode things) and recognize/flag the case in the disassembler. Oddly enough wrong forms were actually used in the testsuite (register- only forms are then really meaningless to test here, and are hence dropped instead of adjusted). Convert the POP2 test that needs touching anyway (due to a bad ModR/M byte having been chosen) to .insn.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-dis.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 31afa9c..d06a918 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -12828,6 +12828,11 @@ print_vector_reg (instr_info *ins, unsigned int reg, int bytemode)
else
names = att_names_xmm;
oappend_register (ins, names[reg]);
+
+ /* Legacy insns promoted to EVEX, like the legacy insns themselves, don't
+ allow use of the upper 16 vector registers. */
+ if (ins->evex_type == evex_from_legacy && reg >= 16)
+ oappend (ins, "(bad)");
}
static bool