mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 16:45:03 +00:00
Fix bug found by regtests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f6ee49fcf0
commit
4690e6d42f
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user