Fix bug found by regtests

llvm-svn: 5294
This commit is contained in:
Chris Lattner 2003-01-15 18:11:11 +00:00
parent c7ffc9b9e3
commit 142533ab9a

View File

@ -1251,18 +1251,14 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
Instruction* returnReg = new TmpInstruction(returnInstr);
MachineCodeForInstruction::get(returnInstr).addTemp(returnReg);
M = new MachineInstr(JMPLRET);
M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister,
returnReg);
M->SetMachineOperandConst(1,MachineOperand::MO_SignExtendedImmed,
(int64_t)8);
M->SetMachineOperandReg(2, target.getRegInfo().getZeroRegNum());
M = BuildMI(JMPLRET, 3).addReg(returnReg).addSImm(8)
.addMReg(target.getRegInfo().getZeroRegNum(), MOTy::Def);
if (returnInstr->getReturnValue() != NULL)
M->addImplicitRef(returnInstr->getReturnValue());
mvec.push_back(M);
mvec.push_back(new MachineInstr(NOP));
mvec.push_back(BuildMI(NOP, 0));
break;
}
@ -1998,8 +1994,8 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
if (isa<Function>(callee)) // direct function call
M = BuildMI(CALL, 1).addPCDisp(callee);
else // indirect function call
M = BuildMI(JMPLCALL,
3).addReg(callee).addSImm((int64_t)0).addReg(retAddrReg);
M = BuildMI(JMPLCALL, 3).addReg(callee).addSImm((int64_t)0)
.addRegDef(retAddrReg);
mvec.push_back(M);
const FunctionType* funcType =