llvm.org GIT mirror llvm / 3548006
Darwin ABI requires FP to point to stack slot of prev FP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33724 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
1 changed file(s) with 14 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
899899 ForceLRSpill = false;
900900 }
901901
902 // Darwin ABI requires FP to point to the stack slot that contains the
903 // previous FP.
904 if (STI.isTargetDarwin()) {
905 MF.changePhyRegUsed(FramePtr, true);
906 NumGPRSpills++;
907 }
908
902909 // If stack and double are 8-byte aligned and we are spilling an odd number
903910 // of GPRs. Spill one extra callee save GPR so we won't have to pad between
904911 // the integer and double callee save areas.
10281035 } else if (MBBI != MBB.end() && MBBI->getOpcode() == ARM::tPUSH)
10291036 ++MBBI;
10301037
1031 // Point FP to the stack slot that contains the previous FP.
1032 if (hasFP(MF))
1038 // Darwin ABI requires FP to point to the stack slot that contains the
1039 // previous FP.
1040 if (STI.isTargetDarwin() || hasFP(MF))
10331041 BuildMI(MBB, MBBI, TII.get(isThumb ? ARM::tADDrSPi : ARM::ADDri), FramePtr)
10341042 .addFrameIndex(FramePtrSpillFI).addImm(0);
10351043
11151123 if (isThumb)
11161124 emitSPUpdate(MBB, MBBI, NumBytes, isThumb, TII);
11171125 else {
1118 if (hasFP(MF)){
1126 // Darwin ABI requires FP to point to the stack slot that contains the
1127 // previous FP.
1128 if (STI.isTargetDarwin() || hasFP(MF)) {
11191129 NumBytes = AFI->getFramePtrSpillOffset() - NumBytes;
11201130 // Reset SP based on frame pointer only if the stack frame extends beyond
11211131 // frame pointer stack slot.
11301140 } else if (NumBytes) {
11311141 emitSPUpdate(MBB, MBBI, NumBytes, false, TII);
11321142 }
1143
11331144 // Move SP to start of integer callee save spill area 2.
11341145 movePastCSLoadStoreOps(MBB, MBBI, ARM::FLDD, 3, STI);
11351146 emitSPUpdate(MBB, MBBI, AFI->getDPRCalleeSavedAreaSize(), false, TII);