[llvm] X86: Support dollar symbol for AT&T syntax and add output-asm-variant to llc (PR #147876)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 20:46:21 PDT 2025


MaskRay wrote:

> > Add `-output-asm-variant` to llc for testing Intel syntax, avoiding
> > `-x86-asm-syntax` which affects MCAsmInfo used by input assembly.
> 
> I think that doesn't matter since we only care about the `$` before the symbol?

In the Intel syntax, `$` doesn't have the immediate value semantics, so `$` doesn't have to be special cased.
This is really a quirk of the AT&T (aka GNU) syntax... While a few other targets also inspect `$` in their AsmParser, they don't have problems using `$var` even without a patch like this..

https://github.com/llvm/llvm-project/pull/147876


More information about the llvm-commits mailing list