<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://4455/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nope, not a waste of time at all. It was a bug in lli that I'm glad to get resolved in top of tree. Thanks for reporting the issue!<div><br></div><div>-Jim</div><div><br><div><div><div>On Nov 5, 2012, at 11:15 AM, Amit Arya <<a href="mailto:aarya@cs.stonybrook.edu">aarya@cs.stonybrook.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div fpstyle="1" ocsi="0" 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-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; "><div style="direction: ltr; font-family: Tahoma; 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'; font-size: 16px; "><hr tabindex="-1"><div id="divRpF283265" style="direction: ltr; "><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Jim Grosbach [<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, November 05, 2012 2:07 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Amit Arya<br><b>Cc:</b><span class="Apple-converted-space"> </span>LLVM Developers Mailing List; Varinder Singh<br><b>Subject:</b><span class="Apple-converted-space"> </span>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></div></blockquote></div></div></div></div></div></div></div></blockquote></div><br></div></div></body></html>