diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-11-18 23:25:52 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-11-18 23:25:52 +0000 |
commit | d9e3385ced2dc887e2fe8e1c071bd2611e4d3ede (patch) | |
tree | db02a4ebc25571107f12a387112d0e9ebc6807f0 /lib/Target/XCore | |
parent | 75b7b879c078366d3e7d90360f01a6e7c0a75b68 (diff) | |
download | external_llvm-d9e3385ced2dc887e2fe8e1c071bd2611e4d3ede.zip external_llvm-d9e3385ced2dc887e2fe8e1c071bd2611e4d3ede.tar.gz external_llvm-d9e3385ced2dc887e2fe8e1c071bd2611e4d3ede.tar.bz2 |
Move getInitialFrameState() to TargetFrameInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCoreFrameInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreFrameInfo.h | 2 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreRegisterInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreRegisterInfo.h | 1 |
4 files changed, 10 insertions, 9 deletions
diff --git a/lib/Target/XCore/XCoreFrameInfo.cpp b/lib/Target/XCore/XCoreFrameInfo.cpp index ae86c95..5359abb 100644 --- a/lib/Target/XCore/XCoreFrameInfo.cpp +++ b/lib/Target/XCore/XCoreFrameInfo.cpp @@ -263,3 +263,11 @@ void XCoreFrameInfo::emitEpilogue(MachineFunction &MF, } } } + +void XCoreFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) + const { + // Initial state of the frame pointer is SP. + MachineLocation Dst(MachineLocation::VirtualFP); + MachineLocation Src(XCore::SP, 0); + Moves.push_back(MachineMove(0, Dst, Src)); +} diff --git a/lib/Target/XCore/XCoreFrameInfo.h b/lib/Target/XCore/XCoreFrameInfo.h index 76960a7..86ca791 100644 --- a/lib/Target/XCore/XCoreFrameInfo.h +++ b/lib/Target/XCore/XCoreFrameInfo.h @@ -33,6 +33,8 @@ namespace llvm { bool hasFP(const MachineFunction &MF) const; + void getInitialFrameState(std::vector<MachineMove> &Moves) const; + //! Stack slot size (4 bytes) static int stackSlotSize() { return 4; diff --git a/lib/Target/XCore/XCoreRegisterInfo.cpp b/lib/Target/XCore/XCoreRegisterInfo.cpp index 381e9ab..1ee3c59 100644 --- a/lib/Target/XCore/XCoreRegisterInfo.cpp +++ b/lib/Target/XCore/XCoreRegisterInfo.cpp @@ -364,13 +364,5 @@ unsigned XCoreRegisterInfo::getRARegister() const { return XCore::LR; } -void XCoreRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) - const { - // Initial state of the frame pointer is SP. - MachineLocation Dst(MachineLocation::VirtualFP); - MachineLocation Src(XCore::SP, 0); - Moves.push_back(MachineMove(0, Dst, Src)); -} - #include "XCoreGenRegisterInfo.inc" diff --git a/lib/Target/XCore/XCoreRegisterInfo.h b/lib/Target/XCore/XCoreRegisterInfo.h index 047fc27..3d21282 100644 --- a/lib/Target/XCore/XCoreRegisterInfo.h +++ b/lib/Target/XCore/XCoreRegisterInfo.h @@ -63,7 +63,6 @@ public: // Debug information queries. unsigned getRARegister() const; unsigned getFrameRegister(const MachineFunction &MF) const; - void getInitialFrameState(std::vector<MachineMove> &Moves) const; //! Return the array of argument passing registers /*! |