29 #define DEBUG_TYPE "msp430-reg-info"
31 #define GET_REGINFO_TARGET_DESC
32 #include "MSP430GenRegisterInfo.inc"
42 static const MCPhysReg CalleeSavedRegs[] = {
43 MSP430::FP, MSP430::R5,
MSP430::R6, MSP430::R7,
47 static const MCPhysReg CalleeSavedRegsFP[] = {
52 static const MCPhysReg CalleeSavedRegsIntr[] = {
53 MSP430::FP, MSP430::R5,
MSP430::R6, MSP430::R7,
58 static const MCPhysReg CalleeSavedRegsIntrFP[] = {
67 CalleeSavedRegsIntrFP : CalleeSavedRegsFP);
70 CalleeSavedRegsIntr : CalleeSavedRegs);
79 Reserved.
set(MSP430::PCB);
80 Reserved.
set(MSP430::SPB);
81 Reserved.
set(MSP430::SRB);
82 Reserved.
set(MSP430::CGB);
83 Reserved.
set(MSP430::PC);
85 Reserved.
set(MSP430::SR);
86 Reserved.
set(MSP430::CG);
90 Reserved.
set(MSP430::FPB);
91 Reserved.
set(MSP430::FP);
100 return &MSP430::GR16RegClass;
105 int SPAdj,
unsigned FIOperandNum,
107 assert(SPAdj == 0 &&
"Unexpected");
145 BuildMI(MBB, std::next(II), dl, TII.
get(MSP430::SUB16ri), DstReg)
146 .addReg(DstReg).
addImm(-Offset);
148 BuildMI(MBB, std::next(II), dl, TII.
get(MSP430::ADD16ri), DstReg)
149 .addReg(DstReg).
addImm(Offset);
const MachineFunction * getParent() const
getParent - Return the MachineFunction containing this basic block.
unsigned getFrameRegister(const MachineFunction &MF) const override
void ChangeToRegister(unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isDebug=false)
ChangeToRegister - Replace this operand with a new register operand of the specified value...
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
const HexagonInstrInfo * TII
MSP430_INTR - Calling convention used for MSP430 interrupt routines.
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Code Generation virtual methods...
const MachineInstrBuilder & addImm(int64_t Val) const
addImm - Add a new immediate operand.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
void ChangeToImmediate(int64_t ImmVal)
ChangeToImmediate - Replace this operand with a new immediate operand of the specified value...
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
const MachineBasicBlock * getParent() const
TargetInstrInfo - Interface to description of machine instruction set.
BitVector getReservedRegs(const MachineFunction &MF) const override
bundle_iterator< MachineInstr, instr_iterator > iterator
const MachineOperand & getOperand(unsigned i) const
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
BuildMI - Builder interface.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
void setDesc(const MCInstrDesc &tid)
Replace the instruction descriptor (thus opcode) of the current instruction with a new one...
MachineFrameInfo * getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
Representation of each machine instruction.
unsigned getReg() const
getReg - Returns the register number.
const ARM::ArchExtKind Kind
virtual const TargetInstrInfo * getInstrInfo() const
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind=0) const override