[all-commits] [llvm/llvm-project] 103cc9: [x86/asm] Make variants work when converting at&t ...
Nico Weber via All-commits
all-commits at lists.llvm.org
Wed Nov 17 10:24:01 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 103cc914d63371212fdc81e450572ee096952211
https://github.com/llvm/llvm-project/commit/103cc914d63371212fdc81e450572ee096952211
Author: Nico Weber <thakis at chromium.org>
Date: 2021-11-17 (Wed, 17 Nov 2021)
Changed paths:
M llvm/include/llvm/Target/TargetMachine.h
M llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
M llvm/lib/Target/PowerPC/PPCTargetMachine.h
A llvm/test/CodeGen/X86/asm-dialect.ll
Log Message:
-----------
[x86/asm] Make variants work when converting at&t inline asm input to intel asm output
`asm` always has AT&T-style input (`asm inteldialect` has Intel-style asm
input), so EmitGCCInlineAsmStr() always has to pick the same variant since it
cares about the input asm string, not the output asm string.
For PowerPC, that default variant is 1. For other targets, it's 0.
Without this, the included test case errors out with
error: unknown use of instruction mnemonic without a size suffix
mov rax, rbx
since it picks the intel branch and then tries to interpret it as AT&T
when selecting intel-style output with `-x86-asm-syntax=intel`.
Differential Revision: https://reviews.llvm.org/D113894
More information about the All-commits
mailing list