[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 22:36:43 PDT 2025
MaskRay wrote:
> > > In your commit I suspect this will not be correct: `calll ($hen at PLT)` It should be `calll ($hen)@PLT`. The modifier is not to be mistaken as part of the symbol.
> >
> >
> > Both `calll ($hen at PLT)` and `calll ($hen)@PLT` are assembled correctly in GAS and LLVM integrated assembler. This patch prints the first form as it minimizes changes to the generic MCAsmInfo::printExpr MCExpr::print.
>
> Have you tried the FreeBSD assembler, or the Solaris one?
No. I vaguely recall that older versions of FreeBSD used an ancient GPL 2 binutils. I believe this `$` parsing has been stable in binutils for a long time. LLVM integrated assembler doesn't intend to be compatible with Solaris.
At any rate, this is about a special case `$`-leading symbol.
https://github.com/llvm/llvm-project/pull/147876
More information about the llvm-commits
mailing list