30 #define GET_REGINFO_TARGET_DESC
31 #include "SparcGenRegisterInfo.inc"
35 cl::desc(
"Reserve application registers (%g2-%g4)"));
79 if (!Subtarget.
isV9()) {
80 for (
unsigned n = 0; n != 16; ++n) {
91 unsigned Kind)
const {
93 return Subtarget.
is64Bit() ? &SP::I64RegsRegClass : &SP::IntRegsRegClass;
100 unsigned FIOperandNum,
int Offset,
104 if (Offset >= -4096 && Offset <= 4095) {
122 .addImm(
HI22(Offset));
140 .addImm(
HIX22(Offset));
154 int SPAdj,
unsigned FIOperandNum,
156 assert(SPAdj == 0 &&
"Unexpected");
181 unsigned SrcEvenReg = getSubReg(SrcReg, SP::sub_even64);
182 unsigned SrcOddReg = getSubReg(SrcReg, SP::sub_odd64);
186 replaceFI(MF, II, *StMI, dl, 0, Offset, FramePtr);
190 }
else if (MI.
getOpcode() == SP::LDQFri) {
193 unsigned DestEvenReg = getSubReg(DestReg, SP::sub_even64);
194 unsigned DestOddReg = getSubReg(DestReg, SP::sub_odd64);
197 .addReg(FramePtr).
addImm(0);
198 replaceFI(MF, II, *StMI, dl, 1, Offset, FramePtr);
206 replaceFI(MF, II, MI, dl, FIOperandNum, Offset, FramePtr);
const MachineFunction * getParent() const
getParent - Return the MachineFunction containing this basic block.
BitVector getReservedRegs(const MachineFunction &MF) const override
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 SparcInstrInfo * getInstrInfo() const override
static unsigned LO10(int64_t imm)
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 uint32_t * getRTCallPreservedMask(CallingConv::ID CC) const
const HexagonInstrInfo * TII
const MachineInstrBuilder & addImm(int64_t Val) const
addImm - Add a new immediate operand.
static unsigned HIX22(int64_t imm)
static unsigned HI22(int64_t imm)
const uint32_t * getCallPreservedMask(const MachineFunction &MF, CallingConv::ID CC) const override
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...
const MachineBasicBlock * getParent() const
TargetInstrInfo - Interface to description of machine instruction set.
bundle_iterator< MachineInstr, instr_iterator > iterator
static cl::opt< bool > ReserveAppRegisters("sparc-reserve-app-registers", cl::Hidden, cl::init(false), cl::desc("Reserve application registers (%g2-%g4)"))
initializer< Ty > init(const Ty &Val)
static unsigned LOX10(int64_t imm)
const MachineOperand & getOperand(unsigned i) const
MCRegAliasIterator enumerates all registers aliasing Reg.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
static void replaceFI(MachineFunction &MF, MachineBasicBlock::iterator II, MachineInstr &MI, DebugLoc dl, unsigned FIOperandNum, int Offset, unsigned FramePtr)
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.
int getAdjustedFrameSize(int stackSize) const
Given a actual stack size as determined by FrameInfo, this function returns adjusted framesize which ...
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Code Generation virtual methods...
void setReg(unsigned Reg)
Change the register this operand corresponds to.
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind) const override
unsigned getReg() const
getReg - Returns the register number.
const ARM::ArchExtKind Kind
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
virtual const TargetInstrInfo * getInstrInfo() const
static const unsigned FramePtr
int64_t getStackPointerBias() const
The 64-bit ABI uses biased stack and frame pointers, so the stack frame of the current function is th...
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
addReg - Add a new virtual register operand...