<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,
<div><br>
</div>
<div>I'm trying to work out what to do to eliminate an "Undefined temporary symbol", which has appeared after I had thought I'd cleared up the last problems trying to implement __builtin_setjmp.</div>
<div><br>
</div>
<div>I know that the symbol it's referring to is "sinkMBB" in the two BuildMI instructions in the code fragment below, as the problem goes away if I remove these lines temporarily (although the algorithm doesn't work then).</div>
<div><br>
</div>
<div>What must I do to eliminate the Undefined Temporary Symbol error, later in the compilation process (raised at ElfObjectWriter.cpp:803)?</div>
<div><br>
</div>
<div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>
<div>Chris Dewhurst, Lero, University of Limerick</div>
<div><br>
</div>
<div>+ const BasicBlock *BB = MBB->getBasicBlock();</div>
<div>+ MachineFunction::iterator It = ++MBB->getIterator();</div>
<div>+ MachineBasicBlock *thisMBB = MBB;</div>
<div>+ const BasicBlock* mainBB = BasicBlock::Create(BB->getContext(), "setjmp.main");</div>
<div>+ MachineBasicBlock *mainMBB = MF->CreateMachineBasicBlock(mainBB);</div>
<div>+ mainMBB->setHasAddressTaken();</div>
<div>+ const BasicBlock* sinkBB = BasicBlock::Create(BB->getContext(), "setjmp.sink");</div>
<div>+ MachineBasicBlock *sinkMBB = MF->CreateMachineBasicBlock(sinkBB);</div>
<div>+ sinkMBB->setHasAddressTaken();</div>
<div>+ </div>
<div>+ MF->insert(It, mainMBB);</div>
<div>+ MF->insert(It, sinkMBB);</div>
<div>+ </div>
<div>+ // Transfer the remainder of BB and its successor edges to sinkMBB.</div>
<div>+ sinkMBB->splice(sinkMBB->begin(), MBB,</div>
<div>+ std::next(MachineBasicBlock::iterator(MI)),</div>
<div>+ MBB->end());</div>
<div>+ sinkMBB->transferSuccessorsAndUpdatePHIs(MBB);</div>
<div>+ </div>
<div>+ MachineInstrBuilder MIB;</div>
<div>+ </div>
<div>+ unsigned LabelReg = MRI.createVirtualRegister(&SP::IntRegsRegClass);</div>
<div>+ unsigned BufReg = MI->getOperand(1).getReg();</div>
<div>+ </div>
<div>+ MIB = BuildMI(*thisMBB, MI, DL, TII->get(SP::SETHIi))</div>
<div>+ .addReg(LabelReg, RegState::Define)</div>
<div>+ .addMBB(sinkMBB, SparcMCExpr::VK_Sparc_HI);</div>
<div>+ MIB.setMemRefs(MMOBegin, MMOEnd);</div>
<div>+ </div>
<div>+ MIB = BuildMI(*thisMBB, MI, DL, TII->get(SP::ADDri))</div>
<div>+ .addReg(LabelReg)</div>
<div>+ .addReg(LabelReg)</div>
<div>+ .addMBB(sinkMBB, SparcMCExpr::VK_Sparc_LO);</div>
<div>+ MIB.setMemRefs(MMOBegin, MMOEnd);</div>
<div>+ </div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>