14 #define DEBUG_TYPE "msp430-reg-info"
29 #define GET_REGINFO_TARGET_DESC
30 #include "MSP430GenRegisterInfo.inc"
37 StackAlign =
TM.getFrameLowering()->getStackAlignment();
44 static const uint16_t CalleeSavedRegs[] = {
45 MSP430::FPW, MSP430::R5W, MSP430::R6W, MSP430::R7W,
46 MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
49 static const uint16_t CalleeSavedRegsFP[] = {
50 MSP430::R5W, MSP430::R6W, MSP430::R7W,
51 MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
54 static const uint16_t CalleeSavedRegsIntr[] = {
55 MSP430::FPW, MSP430::R5W, MSP430::R6W, MSP430::R7W,
56 MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
57 MSP430::R12W, MSP430::R13W, MSP430::R14W, MSP430::R15W,
60 static const uint16_t CalleeSavedRegsIntrFP[] = {
61 MSP430::R5W, MSP430::R6W, MSP430::R7W,
62 MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
63 MSP430::R12W, MSP430::R13W, MSP430::R14W, MSP430::R15W,
69 CalleeSavedRegsIntrFP : CalleeSavedRegsFP);
72 CalleeSavedRegsIntr : CalleeSavedRegs);
81 Reserved.
set(MSP430::PCB);
82 Reserved.
set(MSP430::SPB);
83 Reserved.
set(MSP430::SRB);
84 Reserved.
set(MSP430::CGB);
85 Reserved.
set(MSP430::PCW);
86 Reserved.
set(MSP430::SPW);
87 Reserved.
set(MSP430::SRW);
88 Reserved.
set(MSP430::CGW);
92 Reserved.
set(MSP430::FPW);
100 return &MSP430::GR16RegClass;
105 int SPAdj,
unsigned FIOperandNum,
107 assert(SPAdj == 0 &&
"Unexpected");
116 unsigned BasePtr = (TFI->
hasFP(MF) ? MSP430::FPW : MSP430::SPW);
146 .addReg(DstReg).
addImm(-Offset);
149 .addReg(DstReg).
addImm(Offset);
161 return TFI->
hasFP(MF) ? MSP430::FPW : MSP430::SPW;
const MachineFunction * getParent() const
void ChangeToRegister(unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isDebug=false)
const Function * getFunction() const
CallingConv::ID getCallingConv() const
uint64_t getStackSize() const
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=NULL) const
const HexagonInstrInfo * TII
virtual bool hasFP(const MachineFunction &MF) const =0
const MachineInstrBuilder & addImm(int64_t Val) const
void ChangeToImmediate(int64_t ImmVal)
const MachineBasicBlock * getParent() const
bundle_iterator< MachineInstr, instr_iterator > iterator
BitVector getReservedRegs(const MachineFunction &MF) const
const MachineOperand & getOperand(unsigned i) const
ItTy next(ItTy it, Dist n)
unsigned getFrameRegister(const MachineFunction &MF) const
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
MSP430_INTR - Calling convention used for MSP430 interrupt routines.
virtual const TargetFrameLowering * getFrameLowering() const
const MCInstrDesc & get(unsigned Opcode) const
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind=0) const
int64_t getObjectOffset(int ObjectIdx) const
virtual const TargetInstrInfo * getInstrInfo() const
void setDesc(const MCInstrDesc &tid)
MachineFrameInfo * getFrameInfo()
MSP430RegisterInfo(MSP430TargetMachine &tm)
const TargetMachine & getTarget() const
const uint16_t * getCalleeSavedRegs(const MachineFunction *MF=0) const
Code Generation virtual methods...
unsigned getReg() const
getReg - Returns the register number.
DebugLoc getDebugLoc() const