[llvm-commits] [llvm] r46655 - in /llvm/trunk: include/llvm/Target/MRegisterInfo.h lib/Target/MRegisterInfo.cpp lib/Target/X86/X86RegisterInfo.cpp lib/Target/X86/X86RegisterInfo.h
Evan Cheng
evan.cheng at apple.com
Fri Feb 1 16:17:00 PST 2008
Author: evancheng
Date: Fri Feb 1 18:17:00 2008
New Revision: 46655
URL: http://llvm.org/viewvc/llvm-project?rev=46655&view=rev
Log:
Frame index can be negative.
Modified:
llvm/trunk/include/llvm/Target/MRegisterInfo.h
llvm/trunk/lib/Target/MRegisterInfo.cpp
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
llvm/trunk/lib/Target/X86/X86RegisterInfo.h
Modified: llvm/trunk/include/llvm/Target/MRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/MRegisterInfo.h?rev=46655&r1=46654&r2=46655&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/MRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/Target/MRegisterInfo.h Fri Feb 1 18:17:00 2008
@@ -588,7 +588,7 @@
/// 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.
Modified: llvm/trunk/lib/Target/MRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MRegisterInfo.cpp?rev=46655&r1=46654&r2=46655&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/MRegisterInfo.cpp Fri Feb 1 18:17:00 2008
@@ -74,7 +74,7 @@
/// 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() -
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=46655&r1=46654&r2=46655&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 1 18:17:00 2008
@@ -826,7 +826,7 @@
}
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();
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.h?rev=46655&r1=46654&r2=46655&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.h Fri Feb 1 18:17:00 2008
@@ -122,7 +122,7 @@
// 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.
More information about the llvm-commits
mailing list