28 #define DEBUG_TYPE "msp430-reg-info" 30 #define GET_REGINFO_TARGET_DESC 31 #include "MSP430GenRegisterInfo.inc" 41 static const MCPhysReg CalleeSavedRegs[] = {
42 MSP430::FP, MSP430::R5,
MSP430::R6, MSP430::R7,
43 MSP430::R8, MSP430::R9, MSP430::R10,
46 static const MCPhysReg CalleeSavedRegsFP[] = {
48 MSP430::R8, MSP430::R9, MSP430::R10,
51 static const MCPhysReg CalleeSavedRegsIntr[] = {
52 MSP430::FP, MSP430::R5,
MSP430::R6, MSP430::R7,
53 MSP430::R8, MSP430::R9, MSP430::R10, MSP430::R11,
54 MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15,
57 static const MCPhysReg CalleeSavedRegsIntrFP[] = {
59 MSP430::R8, MSP430::R9, MSP430::R10, MSP430::R11,
60 MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15,
66 CalleeSavedRegsIntrFP : CalleeSavedRegsFP);
69 CalleeSavedRegsIntr : CalleeSavedRegs);
78 Reserved.
set(MSP430::PCB);
79 Reserved.
set(MSP430::SPB);
80 Reserved.
set(MSP430::SRB);
81 Reserved.
set(MSP430::CGB);
82 Reserved.
set(MSP430::PC);
83 Reserved.
set(MSP430::SP);
84 Reserved.
set(MSP430::SR);
85 Reserved.
set(MSP430::CG);
89 Reserved.
set(MSP430::FPB);
90 Reserved.
set(MSP430::FP);
99 return &MSP430::GR16RegClass;
104 int SPAdj,
unsigned FIOperandNum,
106 assert(SPAdj == 0 &&
"Unexpected");
115 unsigned BasePtr = (TFI->
hasFP(MF) ? MSP430::FP : MSP430::SP);
129 if (MI.
getOpcode() == MSP430::ADDframe) {
144 BuildMI(MBB, std::next(II), dl, TII.
get(MSP430::SUB16ri), DstReg)
145 .addReg(DstReg).
addImm(-Offset);
147 BuildMI(MBB, std::next(II), dl, TII.
get(MSP430::ADD16ri), DstReg)
148 .addReg(DstReg).
addImm(Offset);
159 return TFI->
hasFP(MF) ? MSP430::FP : MSP430::SP;
This class represents lattice values for constants.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
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
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.
MSP430_INTR - Calling convention used for MSP430 interrupt routines.
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...
Register getFrameRegister(const MachineFunction &MF) const override
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...
void ChangeToRegister(Register 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...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind=0) const override
Register getReg() const
getReg - Returns the register number.
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...
Wrapper class representing virtual and physical registers.