1 //===- MSP430RegisterInfo.h - MSP430 Register Information Impl --*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the MSP430 implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_MSP430REGISTERINFO_H
15 #define LLVM_TARGET_MSP430REGISTERINFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
18 #include "MSP430GenRegisterInfo.h.inc"
22 class TargetInstrInfo;
24 struct MSP430RegisterInfo : public MSP430GenRegisterInfo {
26 const TargetInstrInfo &TII;
28 MSP430RegisterInfo(const TargetInstrInfo &tii);
30 /// Code Generation virtual methods...
31 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
33 const TargetRegisterClass* const*
34 getCalleeSavedRegClasses(const MachineFunction *MF = 0) const;
36 BitVector getReservedRegs(const MachineFunction &MF) const;
38 bool hasFP(const MachineFunction &MF) const;
40 void eliminateFrameIndex(MachineBasicBlock::iterator II,
41 int SPAdj, RegScavenger *RS = NULL) const;
43 void emitPrologue(MachineFunction &MF) const;
44 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
46 // Debug information queries.
47 unsigned getRARegister() const;
48 unsigned getFrameRegister(MachineFunction &MF) const;
50 //! Get DWARF debugging register number
51 int getDwarfRegNum(unsigned RegNum, bool isEH) const;
54 } // end namespace llvm
56 #endif // LLVM_TARGET_MSP430REGISTERINFO_H