29 #define DEBUG_TYPE "msp430-reg-info" 31 #define GET_REGINFO_TARGET_DESC 32 #include "MSP430GenRegisterInfo.inc" 42 static const MCPhysReg CalleeSavedRegs[] = {
44 MSP430::R8, MSP430::R9, MSP430::R10,
47 static const MCPhysReg CalleeSavedRegsFP[] = {
49 MSP430::R8, MSP430::R9, MSP430::R10,
52 static const MCPhysReg CalleeSavedRegsIntr[] = {
54 MSP430::R8, MSP430::R9, MSP430::R10, MSP430::R11,
55 MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15,
58 static const MCPhysReg CalleeSavedRegsIntrFP[] = {
60 MSP430::R8, MSP430::R9, MSP430::R10, MSP430::R11,
61 MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15,
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);
84 Reserved.
set(MSP430::SP);
85 Reserved.
set(MSP430::SR);
86 Reserved.
set(MSP430::CG);
90 Reserved.
set(MSP430::FPB);
100 return &MSP430::GR16RegClass;
105 int SPAdj,
unsigned FIOperandNum,
107 assert(SPAdj == 0 &&
"Unexpected");
130 if (MI.
getOpcode() == MSP430::ADDframe) {
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);
This class represents lattice values for constants.
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...
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
unsigned getReg() const
getReg - Returns the register number.
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
const HexagonInstrInfo * TII
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Code Generation virtual methods...
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
virtual const TargetInstrInfo * getInstrInfo() const
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
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...
TargetInstrInfo - Interface to description of machine instruction set.
BitVector getReservedRegs(const MachineFunction &MF) const override
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
void setDesc(const MCInstrDesc &tid)
Replace the instruction descriptor (thus opcode) of the current instruction with a new one...
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
const Function & getFunction() const
Return the LLVM function that this machine code represents.
const MachineBasicBlock * getParent() const
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind=0) const override
const MachineOperand & getOperand(unsigned i) const
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects...
MSP430_INTR - Calling convention used for MSP430 interrupt routines.