Create proper frame index for FP

llvm-svn: 77966
This commit is contained in:
Anton Korobeynikov 2009-08-03 08:14:30 +00:00
parent 7d80ab1593
commit 03056efe01
1 changed files with 3 additions and 1 deletions

View File

@ -653,9 +653,11 @@ X86RegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
if (hasFP(MF)) {
assert((TailCallReturnAddrDelta <= 0) &&
"The Delta should always be zero or negative");
const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
// Create a frame entry for the EBP register that must be saved.
int FrameIdx = MFI->CreateFixedObject(SlotSize,
(int)SlotSize * -2+
-(int)SlotSize +
TFI.getOffsetOfLocalArea() +
TailCallReturnAddrDelta);
assert(FrameIdx == MFI->getObjectIndexBegin() &&
"Slot for EBP register must be last in order to be found!");