[LLVMdev] Calling external functions failed on PowerPC
陳韋任
chenwj at iis.sinica.edu.tw
Thu Mar 24 19:03:58 PDT 2011
Hi, all
I found the example code examples/HowToUseJIT.cpp also shows
the same error.
Attachment is the LLVM module created by HowToUseJIT. And here
is the error,
Running foo: %X4<def> = LDtoc <ga:@add1>, %X2
UNREACHABLE executed!
Stack dump:
0. Running pass 'PowerPC Machine Code Emitter' on function '@foo'
Aborted
Currently, I use gdb try to track down where the problem is. Here
is the backtrace,
(gdb) bt
#0 0x00000fffb7b84090 in .raise () from /lib/libc.so.6
#1 0x00000fffb7b85ca4 in .abort () from /lib/libc.so.6
#2 0x0000000010517b9c in ._ZN4llvm25llvm_unreachable_internalEPKcS1_j ()
#3 0x0000000010047aa0 in ._ZN12_GLOBAL__N_114PPCCodeEmitter17getMachineOpValueERKN4llvm12MachineInstrERKNS1_14MachineOperandE ()
#4 0x0000000010048ff4 in ._ZN12_GLOBAL__N_114PPCCodeEmitter14emitBasicBlockERN4llvm17MachineBasicBlockE ()
#5 0x000000001004940c in ._ZN12_GLOBAL__N_114PPCCodeEmitter20runOnMachineFunctionERN4llvm15MachineFunctionE ()
#6 0x00000000101f26f4 in ._ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE ()
#7 0x00000000104b8634 in ._ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE ()
#8 0x00000000104b883c in ._ZN4llvm23FunctionPassManagerImpl3runERNS_8FunctionE ()
#9 0x00000000104b8b1c in ._ZN4llvm19FunctionPassManager3runERNS_8FunctionE ()
#10 0x0000000010020f64 in ._ZN4llvm3JIT14jitTheFunctionEPNS_8FunctionERKNS_10MutexGuardE ()
#11 0x0000000010021314 in ._ZN4llvm3JIT24runJITOnFunctionUnlockedEPNS_8FunctionERKNS_10MutexGuardE ()
#12 0x000000001002155c in ._ZN4llvm3JIT20getPointerToFunctionEPNS_8FunctionE ()
#13 0x00000000100236e4 in ._ZN4llvm3JIT11runFunctionEPNS_8FunctionERKSt6vectorINS_12GenericValueESaIS4_EE ()
#14 0x000000001000918c in main () at HowToUseJIT.cpp:116
Any idea how can I further spot where is the bug? Thanks!
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
More information about the llvm-dev
mailing list