1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Fix a bug in getFrameRegister.

Reported by Raul Herbster.

llvm-svn: 36262
This commit is contained in:
Lauro Ramos Venancio 2007-04-19 14:09:38 +00:00
parent 9339daf407
commit 5e0a3ef555

View File

@ -1474,7 +1474,10 @@ unsigned ARMRegisterInfo::getRARegister() const {
}
unsigned ARMRegisterInfo::getFrameRegister(MachineFunction &MF) const {
return STI.useThumbBacktraces() ? ARM::R7 : ARM::R11;
if (STI.isTargetDarwin() || hasFP(MF))
return STI.useThumbBacktraces() ? ARM::R7 : ARM::R11;
else
return ARM::SP;
}
unsigned ARMRegisterInfo::getEHExceptionRegister() const {