mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
We already have reserved call frame regardless whether variable sized frame objects were present or not
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75987 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -76,24 +76,9 @@ bool SystemZRegisterInfo::hasFP(const MachineFunction &MF) const {
|
|||||||
return NoFramePointerElim || MFI->hasVarSizedObjects();
|
return NoFramePointerElim || MFI->hasVarSizedObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SystemZRegisterInfo::hasReservedCallFrame(MachineFunction &MF) const {
|
|
||||||
// FIXME: Should we always have reserved call frame?
|
|
||||||
return !MF.getFrameInfo()->hasVarSizedObjects();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SystemZRegisterInfo::
|
void SystemZRegisterInfo::
|
||||||
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator I) const {
|
MachineBasicBlock::iterator I) const {
|
||||||
if (!hasReservedCallFrame(MF)) {
|
|
||||||
// If the stack pointer can be changed after prologue, turn the
|
|
||||||
// adjcallstackup instruction into a 'sub R15, <amt>' and the
|
|
||||||
// adjcallstackdown instruction into 'add R15, <amt>'
|
|
||||||
MachineInstr *Old = I;
|
|
||||||
uint64_t Amount = Old->getOperand(0).getImm();
|
|
||||||
|
|
||||||
assert((Amount == 0) && "Not implemented yet!");
|
|
||||||
}
|
|
||||||
|
|
||||||
MBB.erase(I);
|
MBB.erase(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
|
|||||||
|
|
||||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||||
|
|
||||||
bool hasReservedCallFrame(MachineFunction &MF) const;
|
bool hasReservedCallFrame(MachineFunction &MF) const { return true; }
|
||||||
bool hasFP(const MachineFunction &MF) const;
|
bool hasFP(const MachineFunction &MF) const;
|
||||||
|
|
||||||
int getFrameIndexOffset(MachineFunction &MF, int FI) const;
|
int getFrameIndexOffset(MachineFunction &MF, int FI) const;
|
||||||
|
Reference in New Issue
Block a user