mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
bugfix: SP isn't resetted when function has FP and there is no spills.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c1ec780d1e
commit
4642ca6589
@ -1140,10 +1140,11 @@ void ARMRegisterInfo::emitEpilogue(MachineFunction &MF,
|
||||
if (STI.isTargetDarwin() || hasFP(MF)) {
|
||||
NumBytes = AFI->getFramePtrSpillOffset() - NumBytes;
|
||||
// Reset SP based on frame pointer only if the stack frame extends beyond
|
||||
// frame pointer stack slot.
|
||||
// frame pointer stack slot or target is ELF and the function has FP.
|
||||
if (AFI->getGPRCalleeSavedArea2Size() ||
|
||||
AFI->getDPRCalleeSavedAreaSize() ||
|
||||
AFI->getDPRCalleeSavedAreaOffset())
|
||||
AFI->getDPRCalleeSavedAreaOffset()||
|
||||
hasFP(MF))
|
||||
if (NumBytes)
|
||||
BuildMI(MBB, MBBI, TII.get(ARM::SUBri), ARM::SP).addReg(FramePtr)
|
||||
.addImm(NumBytes);
|
||||
|
Loading…
Reference in New Issue
Block a user