Fix a missing def-flag on a Mips epilogue load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71935 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2009-05-16 07:26:06 +00:00
parent f2c3f6a855
commit b5426457f0

View File

@ -473,15 +473,15 @@ emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const
.addReg(Mips::FP).addReg(Mips::ZERO);
// lw $fp,stack_loc($sp)
BuildMI(MBB, MBBI, dl, TII.get(Mips::LW))
.addReg(Mips::FP).addImm(FPOffset).addReg(Mips::SP);
BuildMI(MBB, MBBI, dl, TII.get(Mips::LW), Mips::FP)
.addImm(FPOffset).addReg(Mips::SP);
}
// Restore the return address only if the function isnt a leaf one.
// lw $ra, stack_loc($sp)
if (MFI->hasCalls()) {
BuildMI(MBB, MBBI, dl, TII.get(Mips::LW))
.addReg(Mips::RA).addImm(RAOffset).addReg(Mips::SP);
BuildMI(MBB, MBBI, dl, TII.get(Mips::LW), Mips::RA)
.addImm(RAOffset).addReg(Mips::SP);
}
// adjust stack : insert addi sp, sp, (imm)