diff options
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/MRegisterInfo.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/MRegisterInfo.cpp b/llvm/lib/Target/MRegisterInfo.cpp index eb58a3a0599..515ff9af737 100644 --- a/llvm/lib/Target/MRegisterInfo.cpp +++ b/llvm/lib/Target/MRegisterInfo.cpp @@ -57,7 +57,8 @@ void MRegisterInfo::getLocation(MachineFunction &MF, unsigned Index, ML.set(getFrameRegister(MF), MFI->getObjectOffset(Index) + MFI->getStackSize() - - TFI.getOffsetOfLocalArea()); + TFI.getOffsetOfLocalArea() + + MFI->getOffsetAdjustment()); } /// getInitialFrameState - Returns a list of machine moves that are assumed diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index f061aeed7ee..d9057e048c4 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -1029,7 +1029,9 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { // Get the offset of the stack slot for the EBP register... which is // guaranteed to be the last slot by processFunctionBeforeFrameFinalized. int EBPOffset = MFI->getObjectOffset(MFI->getObjectIndexBegin())+SlotSize; - + // Update the frame offset adjustment. + MFI->setOffsetAdjustment(SlotSize-NumBytes); + // Save EBP into the appropriate stack slot... // mov [ESP-<offset>], EBP MI = addRegOffset(BuildMI(TII, Is64Bit ? X86::MOV64mr : X86::MOV32mr, 5), |

