diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameInfo.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameInfo.h | 1 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCRegisterInfo.h | 1 |
4 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFrameInfo.cpp b/llvm/lib/Target/PowerPC/PPCFrameInfo.cpp index 453975c2671..8fa4bdad6e1 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCFrameInfo.cpp @@ -689,3 +689,10 @@ void PPCFrameInfo::emitEpilogue(MachineFunction &MF, BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILBA8)).addImm(JumpTarget.getImm()); } } + +void PPCFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const { + // Initial state of the frame pointer is R1. + MachineLocation Dst(MachineLocation::VirtualFP); + MachineLocation Src(PPC::R1, 0); + Moves.push_back(MachineMove(0, Dst, Src)); +} diff --git a/llvm/lib/Target/PowerPC/PPCFrameInfo.h b/llvm/lib/Target/PowerPC/PPCFrameInfo.h index aeaa864e0ab..54448dbdd0d 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameInfo.h +++ b/llvm/lib/Target/PowerPC/PPCFrameInfo.h @@ -38,6 +38,7 @@ public: void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; bool hasFP(const MachineFunction &MF) const; + void getInitialFrameState(std::vector<MachineMove> &Moves) const; /// targetHandlesStackFrameRounding - Returns true if the target is /// responsible for rounding up the stack frame (probably at emitPrologue diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp index 0459c7f1ee5..182b65a4ba3 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -943,14 +943,6 @@ unsigned PPCRegisterInfo::getFrameRegister(const MachineFunction &MF) const { return TFI->hasFP(MF) ? PPC::X31 : PPC::X1; } -void PPCRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) - const { - // Initial state of the frame pointer is R1. - MachineLocation Dst(MachineLocation::VirtualFP); - MachineLocation Src(PPC::R1, 0); - Moves.push_back(MachineMove(0, Dst, Src)); -} - unsigned PPCRegisterInfo::getEHExceptionRegister() const { return !Subtarget.isPPC64() ? PPC::R3 : PPC::X3; } diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h index 6e727420777..8a9b522b2de 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h @@ -66,7 +66,6 @@ public: // Debug information queries. unsigned getRARegister() const; unsigned getFrameRegister(const MachineFunction &MF) const; - void getInitialFrameState(std::vector<MachineMove> &Moves) const; // Exception handling queries. unsigned getEHExceptionRegister() const; |

