25 #define GET_REGINFO_TARGET_DESC 26 #include "RISCVGenRegisterInfo.inc" 38 return CSR_XLEN_F64_Interrupt_SaveList;
40 return CSR_XLEN_F32_Interrupt_SaveList;
41 return CSR_Interrupt_SaveList;
50 markSuperRegs(Reserved, RISCV::X0);
51 markSuperRegs(Reserved, RISCV::X1);
52 markSuperRegs(Reserved, RISCV::X2);
53 markSuperRegs(Reserved, RISCV::X3);
54 markSuperRegs(Reserved, RISCV::X4);
55 markSuperRegs(Reserved, RISCV::X8);
56 assert(checkAllSuperRegsMarked(Reserved));
61 return PhysReg == RISCV::X0;
65 return CSR_NoRegs_RegMask;
69 int SPAdj,
unsigned FIOperandNum,
71 assert(SPAdj == 0 &&
"Unexpected non-zero SPAdj value");
82 getFrameLowering(MF)->getFrameIndexReference(MF, FrameIndex, FrameReg) +
87 "Frame offsets outside of the signed 32-bit range not supported");
91 bool FrameRegIsKill =
false;
93 if (!isInt<12>(Offset)) {
98 TII->
movImm32(MBB, II, DL, ScratchReg, Offset);
103 FrameReg = ScratchReg;
104 FrameRegIsKill =
true;
114 return TFI->
hasFP(MF) ? RISCV::X8 : RISCV::X2;
122 return CSR_XLEN_F64_Interrupt_RegMask;
124 return CSR_XLEN_F32_Interrupt_RegMask;
125 return CSR_Interrupt_RegMask;
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
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 uint32_t * getNoPreservedMask() const override
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
BitVector getReservedRegs(const MachineFunction &MF) const override
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
bool isConstantPhysReg(unsigned PhysReg) const override
RISCVRegisterInfo(unsigned HwMode)
const HexagonInstrInfo * TII
virtual bool hasFP(const MachineFunction &MF) const =0
hasFP - Return true if the specified function should have a dedicated frame pointer register...
Simple integer binary arithmetic operators.
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
void movImm32(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, unsigned DstReg, uint64_t Val, MachineInstr::MIFlag Flag=MachineInstr::NoFlags) const
const uint32_t * getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const override
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...
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
This file declares the machine register scavenger class.
unsigned const MachineRegisterInfo * MRI
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
unsigned getFrameRegister(const MachineFunction &MF) const override
constexpr bool isInt< 32 >(int64_t x)
Information about stack frame layout on the target.
const Function & getFunction() const
Return the LLVM function that this machine code represents.
const MachineBasicBlock * getParent() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const MachineOperand & getOperand(unsigned i) const
unsigned createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...