mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-23 17:28:54 +00:00
If a function needs a frame pointer, but r11 (aka fp) has not been used,
remove it from the list of unspilled registers. Otherwise the following attempt to keep the stack aligned by picking an extra GPR register to spill will not work as it picks up r11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1529,6 +1529,10 @@ ARMFrameLowering::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
|
||||
if (hasFP(MF)) {
|
||||
MRI.setPhysRegUsed(FramePtr);
|
||||
auto FPPos = std::find(UnspilledCS1GPRs.begin(), UnspilledCS1GPRs.end(),
|
||||
FramePtr);
|
||||
if (FPPos != UnspilledCS1GPRs.end())
|
||||
UnspilledCS1GPRs.erase(FPPos);
|
||||
NumGPRSpills++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user