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