diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-18 20:57:22 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-18 20:57:22 +0000 |
commit | 0e6a052331f674dd70e28af41f654a7874405eab (patch) | |
tree | 5b2a153966b9f7585e2c882d1d34f97d108d54f2 /lib/Target/MSP430/MSP430RegisterInfo.cpp | |
parent | 1360bc8eb029d51d426c77c4b1410849ff308893 (diff) | |
download | llvm-0e6a052331f674dd70e28af41f654a7874405eab.tar.gz llvm-0e6a052331f674dd70e28af41f654a7874405eab.tar.bz2 llvm-0e6a052331f674dd70e28af41f654a7874405eab.tar.xz |
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time.
This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430/MSP430RegisterInfo.cpp')
-rw-r--r-- | lib/Target/MSP430/MSP430RegisterInfo.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/Target/MSP430/MSP430RegisterInfo.cpp b/lib/Target/MSP430/MSP430RegisterInfo.cpp index 1cc60bba3a..9049c4bf8f 100644 --- a/lib/Target/MSP430/MSP430RegisterInfo.cpp +++ b/lib/Target/MSP430/MSP430RegisterInfo.cpp @@ -34,7 +34,7 @@ using namespace llvm; // FIXME: Provide proper call frame setup / destroy opcodes. MSP430RegisterInfo::MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii) - : MSP430GenRegisterInfo(), TM(tm), TII(tii) { + : MSP430GenRegisterInfo(MSP430::PCW), TM(tm), TII(tii) { StackAlign = TM.getFrameLowering()->getStackAlignment(); } @@ -233,22 +233,8 @@ MSP430RegisterInfo::processFunctionBeforeFrameFinalized(MachineFunction &MF) } } -unsigned MSP430RegisterInfo::getRARegister() const { - return MSP430::PCW; -} - unsigned MSP430RegisterInfo::getFrameRegister(const MachineFunction &MF) const { const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); return TFI->hasFP(MF) ? MSP430::FPW : MSP430::SPW; } - -int MSP430RegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const { - llvm_unreachable("Not implemented yet!"); - return 0; -} - -int MSP430RegisterInfo::getLLVMRegNum(unsigned RegNum, bool isEH) const { - llvm_unreachable("Not implemented yet!"); - return 0; -} |