mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-12 02:47:10 +00:00
Frame index can be negative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
859efca7f9
commit
b8033e821d
@ -588,7 +588,7 @@ public:
|
|||||||
|
|
||||||
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
||||||
/// the stack frame of the specified index.
|
/// 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
|
/// getRARegister - This method should return the register where the return
|
||||||
/// address can be found.
|
/// address can be found.
|
||||||
|
@ -74,7 +74,7 @@ BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF,
|
|||||||
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
||||||
/// the stack frame of the specified index. This is the default implementation
|
/// the stack frame of the specified index. This is the default implementation
|
||||||
/// which is likely incorrect for the target.
|
/// 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();
|
const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
return MFI->getObjectOffset(FI) + MFI->getStackSize() -
|
return MFI->getObjectOffset(FI) + MFI->getStackSize() -
|
||||||
|
@ -826,7 +826,7 @@ unsigned X86RegisterInfo::getFrameRegister(MachineFunction &MF) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, unsigned FI) const {
|
X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||||
int Offset = MF.getFrameInfo()->getObjectOffset(FI) + SlotSize;
|
int Offset = MF.getFrameInfo()->getObjectOffset(FI) + SlotSize;
|
||||||
if (!hasFP(MF))
|
if (!hasFP(MF))
|
||||||
return Offset + MF.getFrameInfo()->getStackSize();
|
return Offset + MF.getFrameInfo()->getStackSize();
|
||||||
|
@ -122,7 +122,7 @@ public:
|
|||||||
// Debug information queries.
|
// Debug information queries.
|
||||||
unsigned getRARegister() const;
|
unsigned getRARegister() const;
|
||||||
unsigned getFrameRegister(MachineFunction &MF) 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;
|
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
|
||||||
|
|
||||||
// Exception handling queries.
|
// Exception handling queries.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user