[all-commits] [llvm/llvm-project] f47b07: [X86] Teach assembler to accept vmsave/vmload/vmru...

Craig Topper via All-commits all-commits at lists.llvm.org
Sat Dec 19 11:02:59 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f47b07315a3c308a214119244b216602c537a1b2
      https://github.com/llvm/llvm-project/commit/f47b07315a3c308a214119244b216602c537a1b2
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrSVM.td
    M llvm/test/MC/Disassembler/X86/simple-tests.txt
    M llvm/test/MC/X86/SVM-32.s
    M llvm/test/MC/X86/SVM-64.s
    M llvm/test/MC/X86/x86-32-coverage.s
    M llvm/test/MC/X86/x86-32.s
    M llvm/test/tools/llvm-mca/X86/Atom/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/Barcelona/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/BdVer2/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/BtVer2/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/Generic/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/SLM/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/SandyBridge/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/Znver1/resources-x86_64.s
    M llvm/test/tools/llvm-mca/X86/Znver2/resources-x86_64.s

  Log Message:
  -----------
  [X86] Teach assembler to accept vmsave/vmload/vmrun/invlpga/skinit with or without the fixed register operands

These instructions read their inputs from fixed registers rather
than using a modrm byte. We shouldn't require the user to list them
when parsing assembly. This matches the GNU assembler.

This patch adds InstAliases so we can accept either form. It also
changes the printing code to use the form without registers. This
will change the behavior of llvm-objdump, but should be consistent
with binutils objdump. This also matches what we already do in LLVM for
clzero and monitorx which also used fixed registers.

I need to add and improve tests before this can be commited. The
disassembler tests exist, but weren't checking the fixed register
so they pass before and after this change.

Fixes https://github.com/ClangBuiltLinux/linux/issues/1216

Differential Revision: https://reviews.llvm.org/D93524




More information about the All-commits mailing list