mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-19 03:29:22 +00:00
Don't want to add FramePtr to callee save spill list twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33727 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
92905d95a0
commit
7588ad478a
@ -881,13 +881,7 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasFP(MF)) {
|
if (!CanEliminateFrame || hasFP(MF)) {
|
||||||
MF.changePhyRegUsed(FramePtr, true);
|
|
||||||
NumGPRSpills++;
|
|
||||||
CanEliminateFrame = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CanEliminateFrame) {
|
|
||||||
AFI->setHasStackFrame(true);
|
AFI->setHasStackFrame(true);
|
||||||
|
|
||||||
// If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled.
|
// If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled.
|
||||||
@ -902,7 +896,7 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const {
|
|||||||
|
|
||||||
// Darwin ABI requires FP to point to the stack slot that contains the
|
// Darwin ABI requires FP to point to the stack slot that contains the
|
||||||
// previous FP.
|
// previous FP.
|
||||||
if (STI.isTargetDarwin()) {
|
if (STI.isTargetDarwin() || hasFP(MF)) {
|
||||||
MF.changePhyRegUsed(FramePtr, true);
|
MF.changePhyRegUsed(FramePtr, true);
|
||||||
NumGPRSpills++;
|
NumGPRSpills++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user