OSDN Git Service

[X86] Correct the implementation of ud1(a.k.a. ud2b) instruction.
authorCraig Topper <craig.topper@intel.com>
Sat, 20 Jun 2020 06:47:43 +0000 (23:47 -0700)
committerCraig Topper <craig.topper@intel.com>
Sat, 20 Jun 2020 06:57:48 +0000 (23:57 -0700)
commitc721bc081eabd818990d92be4cb85cf7150b5468
treea31b7cbdc12cfff292c646fb60127edd58517071
parenta1469914fd7542526693b07a26a0bdcaa27591a3
[X86] Correct the implementation of ud1(a.k.a. ud2b) instruction.

We were missing the modrm byte this instruction has according
to current Intel SDM. Experiments with gcc indicate that different
modrm values are chosen based on 2 operands so I've added those
as well.

I think our previous implementation was based on an older behavior of
binutils that has since been changed.
llvm/lib/Target/X86/X86InstrInfo.td
llvm/lib/Target/X86/X86InstrSystem.td
llvm/test/MC/Disassembler/X86/x86-16.txt
llvm/test/MC/X86/x86-16.s
llvm/test/MC/X86/x86-32.s
llvm/test/MC/X86/x86-64.s