llvm.org GIT mirror llvm / b8033e8
Frame index can be negative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46655 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 12 years ago
4 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
587587
588588 /// getFrameIndexOffset - Returns the displacement from the frame register to
589589 /// the stack frame of the specified index.
590 virtual int getFrameIndexOffset(MachineFunction &MF, unsigned FI) const;
590 virtual int getFrameIndexOffset(MachineFunction &MF, int FI) const;
591591
592592 /// getRARegister - This method should return the register where the return
593593 /// address can be found.
7373 /// getFrameIndexOffset - Returns the displacement from the frame register to
7474 /// the stack frame of the specified index. This is the default implementation
7575 /// which is likely incorrect for the target.
76 int MRegisterInfo::getFrameIndexOffset(MachineFunction &MF, unsigned FI) const {
76 int MRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
7777 const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
7878 MachineFrameInfo *MFI = MF.getFrameInfo();
7979 return MFI->getObjectOffset(FI) + MFI->getStackSize() -
825825 }
826826
827827 int
828 X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, unsigned FI) const {
828 X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
829829 int Offset = MF.getFrameInfo()->getObjectOffset(FI) + SlotSize;
830830 if (!hasFP(MF))
831831 return Offset + MF.getFrameInfo()->getStackSize();
121121 // Debug information queries.
122122 unsigned getRARegister() const;
123123 unsigned getFrameRegister(MachineFunction &MF) const;
124 int getFrameIndexOffset(MachineFunction &MF, unsigned FI) const;
124 int getFrameIndexOffset(MachineFunction &MF, int FI) const;
125125 void getInitialFrameState(std::vector &Moves) const;
126126
127127 // Exception handling queries.