Lines Matching +full:sub +full:- +full:frame
1 //===-- LanaiFrameLowering.cpp - Lanai Frame Information ------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
26 // Determines the size of the frame and maximum call frame size.
36 LRI->hasStackRealignment(MF) ? MFI.getMaxAlign() : getStackAlign(); in determineFrameLayout()
38 // Get the maximum call frame size of all the calls. in determineFrameLayout()
46 // Update maximum call frame size. in determineFrameLayout()
49 // Include call frame size in total. in determineFrameLayout()
53 // Make sure the frame is aligned. in determineFrameLayout()
56 // Update frame info. in determineFrameLayout()
62 // maximum call frame size as the immediate.
85 // st %fp,-4[*%sp] !push old FP
87 // sub %sp,0x4,%sp !allocate stack space (as needed)
90 assert(&MF.front() == &MBB && "Shrink-wrapping not yet supported"); in emitPrologue()
101 // Determine the correct frame layout in emitPrologue()
109 // st %fp,-4[*%sp] in emitPrologue()
113 .addImm(-4) in emitPrologue()
125 // sub %sp,StackSize,%sp in emitPrologue()
146 // It should use the frame pointer only. This is mandatory because
154 // preserved registers via offsets from the frame pointer value.
156 // Note also that when the current frame is being "popped" (by adjusting
159 // the current value of the frame pointer. We can't just add what we
160 // believe to be the (static) frame size to the stack pointer because
168 // ld -4[%fp],%pc # modify %pc (two delay slots)
169 // as the return address is in the stack frame and mov to pc is allowed.
172 // ld -8[%fp],%fp # restore the caller's frame pointer
180 DebugLoc DL = MBBI->getDebugLoc(); in emitEpilogue()
182 // Restore the stack pointer using the callee's frame pointer value. in emitEpilogue()
187 // Restore the frame pointer from the stack. in emitEpilogue()
190 .addImm(-8) in emitEpilogue()
202 int Offset = -4; in determineCalleeSaves()
206 Offset -= 4; in determineCalleeSaves()
210 Offset -= 4; in determineCalleeSaves()
212 if (LRI->hasBasePointer(MF)) { in determineCalleeSaves()
214 SavedRegs.reset(LRI->getBaseRegister()); in determineCalleeSaves()