[cfe-dev] AsmString analysing

arsen hakobyan.ars at gmail.com
Tue Jun 12 00:17:12 PDT 2012

Hi all.

I need to know why does clang change the '$' to '$$' and '%' to '$' in
Inline assembly string before creating the asm call instruction?

for example: 
int result = 0;
asm (
            "mov $10, %0"

the generated assembler code represented in LLVM IR contains:
... asm "mov $$10, $0", "=r"() ...

but when I try to compile it by GCC I get something like this: 
mov $10, %eax

May be Clang does some checking depend on that substitutions?

View this message in context: http://clang-developers.42468.n3.nabble.com/AsmString-analysing-tp4024443.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list