[all-commits] [llvm/llvm-project] 0dda5e: [X86] Ignore bits 2:0 of the modrm byte when disas...

topperc via All-commits all-commits at lists.llvm.org
Fri Jun 19 22:40:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0dda5e4ce2924e59a19f1e466f34a92c0c1638f7
      https://github.com/llvm/llvm-project/commit/0dda5e4ce2924e59a19f1e466f34a92c0c1638f7
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-06-19 (Fri, 19 Jun 2020)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
    M llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
    M llvm/lib/Target/X86/X86InstrFormats.td
    M llvm/lib/Target/X86/X86InstrSSE.td
    M llvm/test/MC/Disassembler/X86/x86-32.txt
    M llvm/tools/llvm-exegesis/lib/X86/Target.cpp
    M llvm/utils/TableGen/X86RecognizableInstr.cpp
    M llvm/utils/TableGen/X86RecognizableInstr.h

  Log Message:
  -----------
  [X86] Ignore bits 2:0 of the modrm byte when disassembling lfence, mfence, and sfence.

These are documented as using modrm byte of 0xe8, 0xf0, and 0xf8
respectively. But hardware ignore bits 2:0. So 0xe9-0xef is treated
the same as 0xe8. Similar for the other two.

Fixing this required adding 8 new formats to the X86 instructions
to convey this information. Could have gotten away with 3, but
adding all 8 made for a more logical conversion from format to
modrm encoding.

I renumbered the format encodings to keep the register modrm
formats grouped together.




More information about the All-commits mailing list