X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FARM%2FARMRegisterInfo.cpp;h=dc7e82b86ce4c31cb77e30108e9ffde913d7deb2;hb=9f8e50d4ed7dcc5ca0f137830ff1185b2afa38bf;hp=503d560403c9607d20b201e9a356434c5cf886bb;hpb=513d0f25ed9b719841c4c9f18e0f22e2ffd426b4;p=oota-llvm.git diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 503d560403c..dc7e82b86ce 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.