[LLVMdev] Question about InlineAsm

Stefan Hepp stefan at stefant.org
Mon Mar 11 06:07:58 PDT 2013


On 03/11/2013 12:56 PM, David Gonzalez Marquez wrote:
> If I remove the symbol "$", it works properly, but does not be the
> corrected att syntax, because in att syntax the constants are prefixed
> by $.

The bitcode inline-asm syntax is different from the C source code 
syntax, clang does some translation there. In bitcode, $<nr> is always 
used to refer to the arguments. If you want to emit a $ symbol in asm, 
you need to escape it with $, i.e., 'mov $$55, %eax'.


More information about the llvm-dev mailing list