<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body style="word-wrap:break-word" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Jim,
<div><br>
</div>
<div>Thanks for the reply. I was able to figure out the problem in 'lli'. InitializeNativeTargetAsmParser() was missing in lli.</div>
<div>I should have replied back saying that the problem was resolved. Hope I didn't waste your time.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Amit<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF283265" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> Jim Grosbach [grosbach@apple.com]<br>
<b>Sent:</b> Monday, November 05, 2012 2:07 PM<br>
<b>To:</b> Amit Arya<br>
<b>Cc:</b> LLVM Developers Mailing List; Varinder Singh<br>
<b>Subject:</b> Re: [LLVMdev] Unable to Run Inline Asm with MCJIT<br>
</font><br>
</div>
<div></div>
<div>Hi Amit,
<div><br>
</div>
<div>You're not doing anything wrong. This is an error in 'lli' not properly initializing the native target libraries. Fixed in SVN trunk r167392.</div>
<div><br>
</div>
<div>-Jim</div>
<div><br>
<div>
<div>On Nov 4, 2012, at 4:09 PM, Amit Arya <<a href="mailto:aarya@cs.stonybrook.edu" target="_blank">aarya@cs.stonybrook.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div bgcolor="#FFFFFF" style="font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div style="direction:ltr; font-family:Tahoma; font-size:10pt">Hi,
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>I have cloned and build LLVM-3.1. Below are more details.</div>
<div><br>
</div>
<div>Arch : x86 </div>
<div>OS :  Linux ubuntu 2.6.35-22-generic</div>
<div><br>
</div>
<div>Sample program : test_inline_asm.c</div>
<div>-------------------</div>
<div>
<div>#include <stdio.h></div>
<div>int main(){</div>
<div>    int a=0;</div>
<div>    __asm __volatile("movl $5,%%eax\t"</div>
<div>    "\n movl %%eax,%0":"=r"(a)::"cc","memory"</div>
<div>    );</div>
<div>    printf("a= %d\n",a);</div>
<div>}</div>
</div>
<div><br>
</div>
<div>Commands </div>
<div>-------------</div>
<div><b>clang -emit-llvm -S test_inline_asm.c</b></div>
<div><b>lli -use-mcjit test_inline_asm.s</b></div>
<div><br>
</div>
<div>throws,</div>
<div><br>
</div>
<div>
<div><b>LLVM ERROR: Inline asm not supported by this streamer because we don't have an asm parser for this target</b></div>
<div><br>
</div>
</div>
<div>Any pointers to what mistake I have been doing.Any help would be much appreciated.</div>
<div><br>
</div>
<div>Thanks & Regards,</div>
<div>Amit Arya</div>
</div>
<span id="skype_highlighting_settings"></span>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>        <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
<span id="skype_highlighting_settings" display="none" autoextractnumbers="1"></span><style type="text/css"></style>
</body>
</html>