[LLVMdev] Inline asm call argument mismatch?

Marcelo Sousa marceloabsousa at gmail.com
Wed Jun 26 05:45:16 PDT 2013


Hello,

In the following code snippet:
%tmp49 = call i64 asm "movq %gs:${1:P},$0", "=r,im,,~{fpsr},~{flags}"(i64*
@kernel_stack) #6, !dbg !6625, !srcloc !5841

I would expect for the inline asm call to receive two arguments because of
the ${1:P} corresponding to a %P1 that will append the $1 to %%gs:.
Can someone explain why there is only one argument in this call?

Moreover, is there any documentation on the constraints that LLVM/clang
generates? I'm not entirely sure that they are just a "copy/past" from the
asm at the C level, since ~{dirflag}, ~{fpsr} seem to be generated.

Finally, how do you deal with inline asm that have multiple outputs and
what's the mechanism used by JIT to support inline asm?

Regards,
Marcelo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/6cd38903/attachment.html>


More information about the llvm-dev mailing list