[LLVMdev] Unable to Run Inline Asm with MCJIT

Amit Arya aarya at cs.stonybrook.edu
Mon Nov 5 11:15:28 PST 2012

Hi Jim,

Thanks for the reply. I was able to figure out the problem in 'lli'. InitializeNativeTargetAsmParser() was missing in lli.
I should have replied back saying that the problem was resolved. Hope I didn't waste your time.

From: Jim Grosbach [grosbach at apple.com]
Sent: Monday, November 05, 2012 2:07 PM
To: Amit Arya
Cc: LLVM Developers Mailing List; Varinder Singh
Subject: Re: [LLVMdev] Unable to Run Inline Asm with MCJIT

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.


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


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);

clang -emit-llvm -S test_inline_asm.c
lli -use-mcjit test_inline_asm.s


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<mailto:LLVMdev at cs.uiuc.edu>         http://llvm.cs.uiuc.edu

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

More information about the llvm-dev mailing list