[all-commits] [llvm/llvm-project] f4335f: [X86, AsmPrinter] Set assembler dialect for module ...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Mar 15 09:38:29 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f4335f075b3496bce6b49f9267e6160d1824b1bb
https://github.com/llvm/llvm-project/commit/f4335f075b3496bce6b49f9267e6160d1824b1bb
Author: Fangrui Song <i at maskray.me>
Date: 2024-03-15 (Fri, 15 Mar 2024)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
A llvm/test/CodeGen/X86/asm-dialect-module.ll
Log Message:
-----------
[X86,AsmPrinter] Set assembler dialect for module inline asm
`clang -c -masm=intel` compiling a source file with file scope basic asm
incorrectly uses the AT&T dialect.
```
% cat a.c
asm("mov rax, rax");
% clang a.c -c -masm=intel
<inline asm>:1:1: error: unknown use of instruction mnemonic without a size suffix
mov rax, rax
^
```
Fix this by setting the assembler dialect from the MCAsmInfo object.
Note: `clang -c -flto -masm=intel a.c` still fails because of
https://reviews.llvm.org/D82862 for #34830: it tried to support AT&T
syntax for clang-cl, but the forced AT&T syntax is not compatible with
intended Intel syntax.
Pull Request: https://github.com/llvm/llvm-project/pull/85367
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list