[LLVMdev] Unable to Run Inline Asm with MCJIT

Jim Grosbach grosbach at apple.com
Mon Nov 5 11:07:40 PST 2012


Hi Amit,

You're not doing anything wrong. This is an error in 'lli' not properly initializing the native target libraries. Fixed in SVN trunk r167392.

-Jim

On Nov 4, 2012, at 4:09 PM, Amit Arya <aarya at cs.stonybrook.edu> wrote:

> Hi,
> 
> I am first year PhD student at Stony Brook University. For one of my projects I am trying to JIT compile and run a C program containing inline assembly using MCJIT but I am not able to.
> 
> I have cloned and build LLVM-3.1. Below are more details.
> 
> Arch : x86 
> OS :  Linux ubuntu 2.6.35-22-generic
> 
> Sample program : test_inline_asm.c
> -------------------
> #include <stdio.h>
> int main(){
>     int a=0;
>     __asm __volatile("movl $5,%%eax\t"
>     "\n movl %%eax,%0":"=r"(a)::"cc","memory"
>     );
>     printf("a= %d\n",a);
> }
> 
> Commands 
> -------------
> clang -emit-llvm -S test_inline_asm.c
> lli -use-mcjit test_inline_asm.s
> 
> throws,
> 
> LLVM ERROR: Inline asm not supported by this streamer because we don't have an asm parser for this target
> 
> Any pointers to what mistake I have been doing.Any help would be much appreciated.
> 
> Thanks & Regards,
> Amit Arya
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121105/52c87a82/attachment.html>


More information about the llvm-dev mailing list