diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-02 00:17:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-02 00:17:00 +0000 |
commit | 4e7ff941f1f29efcd99e71073e4a22e1d921c00a (patch) | |
tree | b08dbb4f7448c933648d7fb5c0a3bc55e25ce691 /llvm/lib | |
parent | 72df405dc56eabdb701b76b7da749e9a88f28cdf (diff) | |
download | bcm5719-llvm-4e7ff941f1f29efcd99e71073e4a22e1d921c00a.tar.gz bcm5719-llvm-4e7ff941f1f29efcd99e71073e4a22e1d921c00a.zip |
Frame index can be negative.
llvm-svn: 46655
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/MRegisterInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/MRegisterInfo.cpp b/llvm/lib/Target/MRegisterInfo.cpp index 0d14aeea55a..8c022cfca09 100644 --- a/llvm/lib/Target/MRegisterInfo.cpp +++ b/llvm/lib/Target/MRegisterInfo.cpp @@ -74,7 +74,7 @@ BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF, /// getFrameIndexOffset - Returns the displacement from the frame register to /// the stack frame of the specified index. This is the default implementation /// which is likely incorrect for the target. -int MRegisterInfo::getFrameIndexOffset(MachineFunction &MF, unsigned FI) const { +int MRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const { const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo(); MachineFrameInfo *MFI = MF.getFrameInfo(); return MFI->getObjectOffset(FI) + MFI->getStackSize() - diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index a0ffd33b21f..cebc10f4f71 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -826,7 +826,7 @@ unsigned X86RegisterInfo::getFrameRegister(MachineFunction &MF) const { } int -X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, unsigned FI) const { +X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const { int Offset = MF.getFrameInfo()->getObjectOffset(FI) + SlotSize; if (!hasFP(MF)) return Offset + MF.getFrameInfo()->getStackSize(); diff --git a/llvm/lib/Target/X86/X86RegisterInfo.h b/llvm/lib/Target/X86/X86RegisterInfo.h index fd18c4135db..e36d5166c98 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.h +++ b/llvm/lib/Target/X86/X86RegisterInfo.h @@ -122,7 +122,7 @@ public: // Debug information queries. unsigned getRARegister() const; unsigned getFrameRegister(MachineFunction &MF) const; - int getFrameIndexOffset(MachineFunction &MF, unsigned FI) const; + int getFrameIndexOffset(MachineFunction &MF, int FI) const; void getInitialFrameState(std::vector<MachineMove> &Moves) const; // Exception handling queries. |