MSP430RegisterInfo.h revision 198090
1193323Sed//===- MSP430RegisterInfo.h - MSP430 Register Information Impl --*- C++ -*-===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed// 10193323Sed// This file contains the MSP430 implementation of the MRegisterInfo class. 11193323Sed// 12193323Sed//===----------------------------------------------------------------------===// 13193323Sed 14193323Sed#ifndef LLVM_TARGET_MSP430REGISTERINFO_H 15193323Sed#define LLVM_TARGET_MSP430REGISTERINFO_H 16193323Sed 17193323Sed#include "llvm/Target/TargetRegisterInfo.h" 18193323Sed#include "MSP430GenRegisterInfo.h.inc" 19193323Sed 20193323Sednamespace llvm { 21193323Sed 22193323Sedclass TargetInstrInfo; 23193323Sedclass MSP430TargetMachine; 24193323Sed 25193323Sedstruct MSP430RegisterInfo : public MSP430GenRegisterInfo { 26193323Sedprivate: 27193323Sed MSP430TargetMachine &TM; 28193323Sed const TargetInstrInfo &TII; 29193323Sed 30193323Sed /// StackAlign - Default stack alignment. 31193323Sed /// 32193323Sed unsigned StackAlign; 33193323Sedpublic: 34193323Sed MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii); 35193323Sed 36193323Sed /// Code Generation virtual methods... 37193323Sed const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const; 38193323Sed 39193323Sed const TargetRegisterClass* const* 40193323Sed getCalleeSavedRegClasses(const MachineFunction *MF = 0) const; 41193323Sed 42193323Sed BitVector getReservedRegs(const MachineFunction &MF) const; 43198090Srdivacky const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const; 44193323Sed 45193323Sed bool hasFP(const MachineFunction &MF) const; 46193323Sed bool hasReservedCallFrame(MachineFunction &MF) const; 47193323Sed 48193323Sed void eliminateCallFramePseudoInstr(MachineFunction &MF, 49193323Sed MachineBasicBlock &MBB, 50193323Sed MachineBasicBlock::iterator I) const; 51193323Sed 52198090Srdivacky unsigned eliminateFrameIndex(MachineBasicBlock::iterator II, 53198090Srdivacky int SPAdj, int *Value = NULL, 54198090Srdivacky RegScavenger *RS = NULL) const; 55193323Sed 56193323Sed void emitPrologue(MachineFunction &MF) const; 57193323Sed void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 58193323Sed 59193323Sed void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 60193323Sed 61193323Sed // Debug information queries. 62193323Sed unsigned getRARegister() const; 63193323Sed unsigned getFrameRegister(MachineFunction &MF) const; 64193323Sed 65193323Sed //! Get DWARF debugging register number 66193323Sed int getDwarfRegNum(unsigned RegNum, bool isEH) const; 67193323Sed}; 68193323Sed 69193323Sed} // end namespace llvm 70193323Sed 71193323Sed#endif // LLVM_TARGET_MSP430REGISTERINFO_H 72