[LLVMdev] Assertion failed after my storeRegToStackSlot/loadFromStackSlot

Dmitriy Limonov earl at excluzive.ws
Sat Feb 23 00:15:42 PST 2013


Hi All.

I'm writing storeRegToStackSlot and loadFromStackSlot function for my 
Target. This Target can store/load one byte (not all word) from 
FrameIndex. If I need to store 16 bit register I will must to split it 
to two instruction like this:

BuildMI(MBB, MI, dl, get(Z80::LD8xmr))
   .addFrameIndex(FrameIndex).addImm(0)
   .addReg(SrcReg, 0, Z80::subreg_lo);
BuildMI(MBB, MI, dl, get(Z80::LD8xmr))
   .addFrameIndex(FrameIndex).addImm(1)
   .addReg(SrcReg, getKillRegState(isKill), Z80::subreg_hi);

After this store I catch assertion failed: "Instruction not found in 
maps", because only last of this instruction added in Instruction maps.
How can I avoid assertion failed in this case?

Best regards, Dmitriy.




More information about the llvm-dev mailing list