[all-commits] [llvm/llvm-project] bf834b: [x86/asm] Let EmitMSInlineAsmStr() handle variants...

Nico Weber via All-commits all-commits at lists.llvm.org
Wed Nov 17 10:32:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf834b26292e58d86bc289a3eb0c736c400e600a
      https://github.com/llvm/llvm-project/commit/bf834b26292e58d86bc289a3eb0c736c400e600a
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-11-17 (Wed, 17 Nov 2021)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
    M llvm/test/CodeGen/X86/asm-dialect.ll

  Log Message:
  -----------
  [x86/asm] Let EmitMSInlineAsmStr() handle variants too

This is preparation for D113707, where I want to make `-masm=intel`
emit `asm inteldialect` instructions.

`{movq %rbx, %rax|mov rax, rbx}` is supposed to evaluate to the bit
between { and | for att and to the bit between | and } for intel.
Since intel will become `asm inteldialect`, which alls EmitMSInlineAsmStr(),
EmitMSInlineAsmStr() has to support variants as well.

(clang translates `{...|...}` to `$(...$|...$)`. I'm not sure why
it doesn't just send along only the first `...` or the second `...`
to LLVM, but given the notes in PR23933 let's not do a big
reorganization in this codepath.)

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




More information about the All-commits mailing list