On 5/7/2012 10:17 PM, Bendersky, Eli wrote: <snip>>>> $lli -entry-function="ISimEngine_GetVersion" -use-mcjit libengine.bc >>> LLVM ERROR: Inline asm not supported by this streamer because we don't >>> have an asm parser for this target >> >> I also tried other variations of the call with the same result: >>> $lli -entry-function="ISimEngine_GetVersion" -use-mcjit -mattr=+avx >>> -mcpu=corei7-avx libengine.bc >> >> I updated my program looking at lli.cpp and it also gave the same error as >> above. The info from lli --version is below: >> >>> $lli --version >>> LLVM (http://llvm.org/): >>> LLVM version 3.2svn >>> Optimized build with assertions. >>> Built May 7 2012 (10:54:43). >>> Default target: x86_64-unknown-linux-gnu >>> Host CPU: corei7-avx >> >> Any pointers? I saw another thread "Trouble using the MCJIT: "Target does >> not support MC emission" error" but that didnt seem to have positive >> ending. >> > > Sorry, I'm not familiar with these parts (ASM parsing in MC). Perhaps someone else could help here. I wonder, though, did you manage to get some code running without inline ASM? > EliI tried the attached program, compiled with clang and used lli to run it: clang -cc1 -O0 -g -emit-llvm test.c lli -use-mcjit test.ll The lli prints out what looks like binary data. If I remove the inline asm from the program, it works fine. TIA, Ashok -------------- next part -------------- //#include <stdio.h> /* void f(void) { } */ int main(void) { int foo = 10, bar = 15; __asm__ __volatile__("addl %%ebx,%%eax" :"=a"(foo) :"a"(foo), "b"(bar) ); //printf("foo+bar=%d\n", foo); return 0; }
Resending, any pointers are much appreciated. On 5/7/2012 11:16 PM, Ashok Nalkund wrote:> > > On 5/7/2012 10:17 PM, Bendersky, Eli wrote: > <snip> >>>> $lli -entry-function="ISimEngine_GetVersion" -use-mcjit libengine.bc >>>> LLVM ERROR: Inline asm not supported by this streamer because we don't >>>> have an asm parser for this target >>> >>> I also tried other variations of the call with the same result: >>>> $lli -entry-function="ISimEngine_GetVersion" -use-mcjit -mattr=+avx >>>> -mcpu=corei7-avx libengine.bc >>> >>> I updated my program looking at lli.cpp and it also gave the same >>> error as >>> above. The info from lli --version is below: >>> >>>> $lli --version >>>> LLVM (http://llvm.org/): >>>> LLVM version 3.2svn >>>> Optimized build with assertions. >>>> Built May 7 2012 (10:54:43). >>>> Default target: x86_64-unknown-linux-gnu >>>> Host CPU: corei7-avx >>> >>> Any pointers? I saw another thread "Trouble using the MCJIT: "Target >>> does >>> not support MC emission" error" but that didnt seem to have positive >>> ending. >>> >> >> Sorry, I'm not familiar with these parts (ASM parsing in MC). Perhaps >> someone else could help here. I wonder, though, did you manage to get >> some code running without inline ASM? >> Eli > > I tried the attached program, compiled with clang and used lli to run it: > clang -cc1 -O0 -g -emit-llvm test.c > lli -use-mcjit test.ll > > The lli prints out what looks like binary data. If I remove the inline > asm from the program, it works fine. > > TIA, > Ashok > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >>>> $lli -entry-function="ISimEngine_GetVersion" -use-mcjit libengine.bc > >>>> LLVM ERROR: Inline asm not supported by this streamer because we don't > >>>> have an asm parser for this targetYou can see the error message comes from lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp. --- OwningPtr<MCTargetAsmParser> TAP(TM.getTarget().createMCAsmParser(*STI, *Parser)); if (!TAP) report_fatal_error("Inline asm not supported by this streamer because" " we don't have an asm parser for this target\n"); --- X86 has implemented X86AsmParser as MCTargetAsmParser's sub-class (lib/Target/X86/AsmParser/X86AsmParser.cpp). Perhaps you just need to let createMCAsmParser function return X86AsmParser. HTH, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
Reasonably Related Threads
- [LLVMdev] JIT support for inline asm on Linux
- [LLVMdev] JIT support for inline asm on Linux
- [LLVMdev] JIT support for inline asm on Linux
- [LLVMdev] lli unable to resolve symbol _ZNKSt3__16locale9use_facetERNS0_2idE in bitcode
- [LLVMdev] lli unable to resolve symbol _ZNKSt3__16locale9use_facetERNS0_2idE in bitcode