[LLVMdev] Calling external functions failed on PowerPC

陳韋任 chenwj at iis.sinica.edu.tw
Sun Mar 27 01:10:00 PDT 2011


Hi, all

>   I found the example code examples/HowToUseJIT.cpp also shows
> the same error.

  At the end of inserting instruction into the Module created in
HowToUseJIT.cpp, I call function verifyModule to verify if everything
is O.K.. This time, it gave me much readable output,

Running foo: HowToUseJIT: /tmp/chenwj/llvm-2.8/lib/Target/PowerPC/PPCCodeEmitter.cpp:156: unsigned int<unnamed>::PPCCodeEmitter::getMachineOpValue(const
llvm::MachineInstr&, const llvm::MachineOperand&): Assertion `MovePCtoLROffset && "MovePCtoLR not seen yet?"' failed.
Stack dump:
0.      Running pass 'PowerPC Machine Code Emitter' on function '@foo'
Aborted

  The assert comes from PPCCodeEmitter.cpp.

if (TM.getRelocationModel() == Reloc::PIC_) {
  assert(MovePCtoLROffset && "MovePCtoLR not seen yet?");
}

  Which direction I should look into? Thanks!

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer System 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