aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-03-02 01:17:17 +0000
committerDale Johannesen <dalej@apple.com>2007-03-02 01:17:17 +0000
commit9f8e50d4ed7dcc5ca0f137830ff1185b2afa38bf (patch)
tree9d289b926feb879b874d776639d94bff2ea0792d
parent513d0f25ed9b719841c4c9f18e0f22e2ffd426b4 (diff)
eliminate unnecessary reset of SP in epilog on darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34824 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMRegisterInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp
index 503d560403..dc7e82b86c 100644
--- a/lib/Target/ARM/ARMRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMRegisterInfo.cpp
@@ -1290,7 +1290,7 @@ void ARMRegisterInfo::emitEpilogue(MachineFunction &MF,
} else {
// Darwin ABI requires FP to point to the stack slot that contains the
// previous FP.
- if (STI.isTargetDarwin() || hasFP(MF)) {
+ if ((STI.isTargetDarwin() && NumBytes) || hasFP(MF)) {
NumBytes = AFI->getFramePtrSpillOffset() - NumBytes;
// Reset SP based on frame pointer only if the stack frame extends beyond
// frame pointer stack slot or target is ELF and the function has FP.