LLVM API Documentation
00001 //===- MSP430RegisterInfo.h - MSP430 Register Information Impl --*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the MSP430 implementation of the MRegisterInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_TARGET_MSP430REGISTERINFO_H 00015 #define LLVM_TARGET_MSP430REGISTERINFO_H 00016 00017 #include "llvm/Target/TargetRegisterInfo.h" 00018 #include "MSP430GenRegisterInfo.h.inc" 00019 00020 namespace llvm { 00021 00022 class TargetInstrInfo; 00023 class MSP430TargetMachine; 00024 00025 struct MSP430RegisterInfo : public MSP430GenRegisterInfo { 00026 private: 00027 MSP430TargetMachine &TM; 00028 const TargetInstrInfo &TII; 00029 00030 /// StackAlign - Default stack alignment. 00031 /// 00032 unsigned StackAlign; 00033 public: 00034 MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii); 00035 00036 /// Code Generation virtual methods... 00037 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const; 00038 00039 const TargetRegisterClass* const* 00040 getCalleeSavedRegClasses(const MachineFunction *MF = 0) const; 00041 00042 BitVector getReservedRegs(const MachineFunction &MF) const; 00043 const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const; 00044 00045 bool hasFP(const MachineFunction &MF) const; 00046 bool hasReservedCallFrame(MachineFunction &MF) const; 00047 00048 void eliminateCallFramePseudoInstr(MachineFunction &MF, 00049 MachineBasicBlock &MBB, 00050 MachineBasicBlock::iterator I) const; 00051 00052 void eliminateFrameIndex(MachineBasicBlock::iterator II, 00053 int SPAdj, RegScavenger *RS = NULL) const; 00054 00055 void emitPrologue(MachineFunction &MF) const; 00056 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 00057 00058 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 00059 00060 // Debug information queries. 00061 unsigned getRARegister() const; 00062 unsigned getFrameRegister(MachineFunction &MF) const; 00063 00064 //! Get DWARF debugging register number 00065 int getDwarfRegNum(unsigned RegNum, bool isEH) const; 00066 }; 00067 00068 } // end namespace llvm 00069 00070 #endif // LLVM_TARGET_MSP430REGISTERINFO_H