summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MRegisterInfo.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-08-03 17:27:09 +0000
committerJim Laskey <jlaskey@mac.com>2006-08-03 17:27:09 +0000
commitf2c14591e66f9ed4dc14bc0cc915140afae220cf (patch)
tree413a0fc694ebf4c165228c6c4edf6cc70adc40fd /llvm/lib/Target/MRegisterInfo.cpp
parenta1084234754d5c747e2d2dea2eda79fe2f6550fd (diff)
downloadbcm5719-llvm-f2c14591e66f9ed4dc14bc0cc915140afae220cf.tar.gz
bcm5719-llvm-f2c14591e66f9ed4dc14bc0cc915140afae220cf.zip
Get darwin intel debugging up and running.
llvm-svn: 29504
Diffstat (limited to 'llvm/lib/Target/MRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/MRegisterInfo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/MRegisterInfo.cpp b/llvm/lib/Target/MRegisterInfo.cpp
index 920bb5d3af3..eb58a3a0599 100644
--- a/llvm/lib/Target/MRegisterInfo.cpp
+++ b/llvm/lib/Target/MRegisterInfo.cpp
@@ -11,7 +11,9 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/MRegisterInfo.h"
+#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
@@ -50,9 +52,12 @@ std::vector<bool> MRegisterInfo::getAllocatableSet(MachineFunction &MF) const {
/// variables and then call MRegisterInfo::getLocation for the default action.
void MRegisterInfo::getLocation(MachineFunction &MF, unsigned Index,
MachineLocation &ML) const {
+ const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
MachineFrameInfo *MFI = MF.getFrameInfo();
ML.set(getFrameRegister(MF),
- MFI->getObjectOffset(Index) + MFI->getStackSize());
+ MFI->getObjectOffset(Index) +
+ MFI->getStackSize() -
+ TFI.getOffsetOfLocalArea());
}
/// getInitialFrameState - Returns a list of machine moves that are assumed
OpenPOWER on IntegriCloud