]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: refine UD<n> kind-of-insns
authorJan Beulich <jbeulich@suse.com>
Fri, 13 Jun 2025 06:40:32 +0000 (08:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 13 Jun 2025 06:40:32 +0000 (08:40 +0200)
commit062f7a549024dca002cb9c8db878195ce93ea28b
tree85198d90bf62b36c5570cadb3c248d003b1e01e1
parent2e284502288b705d1878a0aac29720b6d6e15fb8
x86: refine UD<n> kind-of-insns

While documentation of these continues to be lacking sufficient detail,
it is becoming increasingly clear that in 66f1eba0b7e8 ("x86: correct
UDn") I went too far with requiring operands, to populate a ModR/M byte.
AMD hardware appears to always behave as indicated as "may" in PM 3.36,
which for all practical purposes means there's no ModR/M byte. The SDM
(rev 087) indicates that such behavior can occur on older hardware for
UD0. Re-add an operand-less UD1 form (as well as its UD2B alias), while
newly adding such a form also for UD0. Because of the ambiguity, there's
no good/easy way of handling both possibilities in the disassembler,
which hence remains unaltered.

Further, from all information I'm able to gather, the 0F opcode space
was only introduced with the i286; bump the minimal hardware requirement
for all UD<n> accordingly.
gas/testsuite/gas/i386/arch-4.d
gas/testsuite/gas/i386/arch-4.s
opcodes/i386-opc.tbl
opcodes/i386-tbl.h