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 | b8033e821d9ccad10ba8770c4561600a3e9ce6cc (patch) | |
tree | 898bd88d1adfa2542103cc722803559a10938261 | |
parent | 859efca7f9c412f251e2303fe1f0ae80728d2c91 (diff) | |
download | external_llvm-b8033e821d9ccad10ba8770c4561600a3e9ce6cc.zip external_llvm-b8033e821d9ccad10ba8770c4561600a3e9ce6cc.tar.gz external_llvm-b8033e821d9ccad10ba8770c4561600a3e9ce6cc.tar.bz2 |
Frame index can be negative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46655 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/MRegisterInfo.h | 2 | ||||
-rw-r--r-- | lib/Target/MRegisterInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index 8a90f50..ae3f27b 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -588,7 +588,7 @@ public: /// getFrameIndexOffset - Returns the displacement from the frame register to /// the stack frame of the specified index. - virtual int getFrameIndexOffset(MachineFunction &MF, unsigned FI) const; + virtual int getFrameIndexOffset(MachineFunction &MF, int FI) const; /// getRARegister - This method should return the register where the return /// address can be found. diff --git a/lib/Target/MRegisterInfo.cpp b/lib/Target/MRegisterInfo.cpp index 0d14aee..8c022cf 100644 --- a/lib/Target/MRegisterInfo.cpp +++ b/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/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index a0ffd33..cebc10f 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/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/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index fd18c41..e36d5166 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/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. |