mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 23:20:54 +00:00
Adjust processFunctionBeforeCalleeSavedScan() to correctly reserve a stack
slot for the register scavenger when compiling Thumb1 functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83023 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d0c5a292aa
commit
ec9eef4a15
@ -536,7 +536,8 @@ ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
}
|
||||
}
|
||||
|
||||
if (CSRegClasses[i] == ARM::GPRRegisterClass) {
|
||||
if (CSRegClasses[i] == ARM::GPRRegisterClass ||
|
||||
CSRegClasses[i] == ARM::tGPRRegisterClass) {
|
||||
if (Spilled) {
|
||||
NumGPRSpills++;
|
||||
|
||||
@ -667,7 +668,8 @@ ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
NumExtras--;
|
||||
}
|
||||
}
|
||||
while (NumExtras && !UnspilledCS2GPRs.empty()) {
|
||||
while (NumExtras && !UnspilledCS2GPRs.empty() &&
|
||||
!AFI->isThumb1OnlyFunction()) {
|
||||
unsigned Reg = UnspilledCS2GPRs.back();
|
||||
UnspilledCS2GPRs.pop_back();
|
||||
if (!isReservedReg(MF, Reg)) {
|
||||
|
Loading…
Reference in New Issue
Block a user