19 "stackmap and patchpoint intrinsics.");
34 static const MCPhysReg ELF64ArgGPRs[] = {PPC::X3, PPC::X4, PPC::X5, PPC::X6,
35 PPC::X7, PPC::X8, PPC::X9, PPC::X10};
36 const unsigned ELF64NumArgGPRs = std::size(ELF64ArgGPRs);
39 if (FirstUnallocGPR == ELF64NumArgGPRs)
45 if (LocVT == MVT::f32 || LocVT == MVT::f64)
53 if ((State.
AllocateReg(ELF64ArgGPRs) - PPC::X3) % 2 == 1)
73 PPC::R3, PPC::R4, PPC::R5, PPC::R6,
74 PPC::R7, PPC::R8, PPC::R9, PPC::R10,
76 const unsigned NumArgRegs = std::size(ArgRegs);
84 if (RegNum != NumArgRegs && RegNum % 2 == 1) {
98 PPC::R3, PPC::R4, PPC::R5, PPC::R6,
99 PPC::R7, PPC::R8, PPC::R9, PPC::R10,
101 const unsigned NumArgRegs = std::size(ArgRegs);
104 int RegsLeft = NumArgRegs - RegNum;
108 if (RegNum != NumArgRegs && RegsLeft < 4) {
109 for (
int i = 0; i < RegsLeft; i++) {
123 PPC::F1, PPC::F2, PPC::F3, PPC::F4, PPC::F5, PPC::F6, PPC::F7,
127 const unsigned NumArgRegs = std::size(ArgRegs);
133 if (RegNum != NumArgRegs && ArgRegs[RegNum] == PPC::F8) {
150 static const MCPhysReg HiRegList[] = { PPC::R3, PPC::R5, PPC::R7, PPC::R9 };
151 static const MCPhysReg LoRegList[] = { PPC::R4, PPC::R6, PPC::R8, PPC::R10 };
159 for (i = 0; i < std::size(HiRegList); ++i)
160 if (HiRegList[i] == Reg)
165 assert(
T == LoRegList[i] &&
"Could not allocate register");
179 static const MCPhysReg HiRegList[] = { PPC::R3 };
180 static const MCPhysReg LoRegList[] = { PPC::R4 };
183 unsigned Reg = State.
AllocateReg(HiRegList, LoRegList);
188 for (i = 0; i < std::size(HiRegList); ++i)
189 if (HiRegList[i] == Reg)
198#include "PPCGenCallingConv.inc"
bool CC_PPC64_ELF_Shadow_GPR_Regs(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
static bool CC_PPC32_SVR4_Custom_AlignArgRegs(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
static bool CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
bool CC_PPC_AnyReg_Error(unsigned &, MVT &, MVT &, CCValAssign::LocInfo &, ISD::ArgFlagsTy &, CCState &)
static bool CC_PPC32_SPE_RetF64(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
static bool CC_PPC32_SPE_CustomSplitFP64(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
static bool CC_PPC32_SVR4_Custom_AlignFPArgRegs(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
static bool CC_PPC32_SVR4_Custom_Dummy(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
CCState - This class holds information needed while lowering arguments and return values.
unsigned getFirstUnallocated(ArrayRef< MCPhysReg > Regs) const
getFirstUnallocated - Return the index of the first unallocated register in the set,...
MCRegister AllocateReg(MCPhysReg Reg)
AllocateReg - Attempt to allocate one register.
void addLoc(const CCValAssign &V)
static CCValAssign getCustomReg(unsigned ValNo, MVT ValVT, unsigned RegNo, MVT LocVT, LocInfo HTP)
bool is128BitVector() const
Return true if this is a 128-bit vector type.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.