mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
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:
parent
f2c3f6a855
commit
b5426457f0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user