mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Move getInitialFrameState() to TargetFrameInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -248,3 +248,10 @@ void SPUFrameInfo::emitEpilogue(MachineFunction &MF,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SPUFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
|
||||
// Initial state of the frame pointer is R1.
|
||||
MachineLocation Dst(MachineLocation::VirtualFP);
|
||||
MachineLocation Src(SPU::R1, 0);
|
||||
Moves.push_back(MachineMove(0, Dst, Src));
|
||||
}
|
||||
|
@@ -40,6 +40,9 @@ namespace llvm {
|
||||
//! Prediate: Target has dedicated frame pointer
|
||||
bool hasFP(const MachineFunction &MF) const;
|
||||
|
||||
//! Perform target-specific stack frame setup.
|
||||
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
|
||||
|
||||
//! Return a function's saved spill slots
|
||||
/*!
|
||||
For CellSPU, a function's saved spill slots is just the link register.
|
||||
|
@@ -340,16 +340,6 @@ SPURegisterInfo::getFrameRegister(const MachineFunction &MF) const
|
||||
return SPU::R1;
|
||||
}
|
||||
|
||||
void
|
||||
SPURegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const
|
||||
{
|
||||
// Initial state of the frame pointer is R1.
|
||||
MachineLocation Dst(MachineLocation::VirtualFP);
|
||||
MachineLocation Src(SPU::R1, 0);
|
||||
Moves.push_back(MachineMove(0, Dst, Src));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
SPURegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
|
||||
// FIXME: Most probably dwarf numbers differs for Linux and Darwin
|
||||
|
@@ -71,8 +71,6 @@ namespace llvm {
|
||||
unsigned getRARegister() const;
|
||||
//! Get the stack frame register (SP, aka R1)
|
||||
unsigned getFrameRegister(const MachineFunction &MF) const;
|
||||
//! Perform target-specific stack frame setup.
|
||||
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// New methods added:
|
||||
|
Reference in New Issue
Block a user