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:
Jim Grosbach 2009-09-28 22:08:06 +00:00
parent d0c5a292aa
commit ec9eef4a15

View File

@ -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)) {