mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Add x86 specific getFrameIndexOffset(). This fixes local variable debugging info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46598 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
72bebb9205
commit
c67aa7cbd5
@ -835,6 +835,20 @@ unsigned X86RegisterInfo::getFrameRegister(MachineFunction &MF) const {
|
||||
return hasFP(MF) ? FramePtr : StackPtr;
|
||||
}
|
||||
|
||||
int
|
||||
X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, unsigned FI) const {
|
||||
int Offset = MF.getFrameInfo()->getObjectOffset(FI) + SlotSize;
|
||||
if (!hasFP(MF))
|
||||
return Offset + MF.getFrameInfo()->getStackSize();
|
||||
|
||||
Offset += SlotSize; // Skip the saved EBP
|
||||
// Skip the RETADDR move area
|
||||
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
|
||||
int TailCallReturnAddrDelta = X86FI->getTCReturnAddrDelta();
|
||||
if (TailCallReturnAddrDelta < 0) Offset -= TailCallReturnAddrDelta;
|
||||
return Offset;
|
||||
}
|
||||
|
||||
void X86RegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves)
|
||||
const {
|
||||
// Calculate amount of bytes used for return address storing
|
||||
|
@ -122,6 +122,7 @@ public:
|
||||
// Debug information queries.
|
||||
unsigned getRARegister() const;
|
||||
unsigned getFrameRegister(MachineFunction &MF) const;
|
||||
int getFrameIndexOffset(MachineFunction &MF, unsigned FI) const;
|
||||
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
|
||||
|
||||
// Exception handling queries.
|
||||
|
Loading…
Reference in New Issue
Block a user