MSP430RegisterInfo.h revision dce4a407a24b04eebc6a376f8e62b41aaa7b071f
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 19#define GET_REGINFO_HEADER 20#include "MSP430GenRegisterInfo.inc" 21 22namespace llvm { 23 24class TargetInstrInfo; 25class MSP430TargetMachine; 26 27struct MSP430RegisterInfo : public MSP430GenRegisterInfo { 28private: 29 MSP430TargetMachine &TM; 30 31 /// StackAlign - Default stack alignment. 32 /// 33 unsigned StackAlign; 34public: 35 MSP430RegisterInfo(MSP430TargetMachine &tm); 36 37 /// Code Generation virtual methods... 38 const MCPhysReg * 39 getCalleeSavedRegs(const MachineFunction *MF = nullptr) const override; 40 41 BitVector getReservedRegs(const MachineFunction &MF) const override; 42 const TargetRegisterClass* 43 getPointerRegClass(const MachineFunction &MF, 44 unsigned Kind = 0) const override; 45 46 void eliminateFrameIndex(MachineBasicBlock::iterator II, 47 int SPAdj, unsigned FIOperandNum, 48 RegScavenger *RS = nullptr) const override; 49 50 // Debug information queries. 51 unsigned getFrameRegister(const MachineFunction &MF) const override; 52}; 53 54} // end namespace llvm 55 56#endif // LLVM_TARGET_MSP430REGISTERINFO_H 57