18 "stackmap and patchpoint intrinsics.");
33 static const MCPhysReg ELF64ArgGPRs[] = {PPC::X3, PPC::X4, PPC::X5, PPC::X6,
34 PPC::X7, PPC::X8, PPC::X9, PPC::X10};
35 const unsigned ELF64NumArgGPRs = std::size(ELF64ArgGPRs);
38 if (FirstUnallocGPR == ELF64NumArgGPRs)
44 if (LocVT == MVT::f32 || LocVT == MVT::f64)
52 if ((State.
AllocateReg(ELF64ArgGPRs) - PPC::X3) % 2 == 1)
72 PPC::R3, PPC::R4, PPC::R5, PPC::R6,
73 PPC::R7, PPC::R8, PPC::R9, PPC::R10,
75 const unsigned NumArgRegs = std::size(ArgRegs);
83 if (RegNum != NumArgRegs && RegNum % 2 == 1) {
97 PPC::R3, PPC::R4, PPC::R5, PPC::R6,
98 PPC::R7, PPC::R8, PPC::R9, PPC::R10,
100 const unsigned NumArgRegs = std::size(ArgRegs);
103 int RegsLeft = NumArgRegs - RegNum;
107 if (RegNum != NumArgRegs && RegsLeft < 4) {
108 for (
int i = 0; i < RegsLeft; i++) {
122 PPC::F1, PPC::F2, PPC::F3, PPC::F4, PPC::F5, PPC::F6, PPC::F7,
126 const unsigned NumArgRegs = std::size(ArgRegs);
132 if (RegNum != NumArgRegs && ArgRegs[RegNum] == PPC::F8) {
149 static const MCPhysReg HiRegList[] = { PPC::R3, PPC::R5, PPC::R7, PPC::R9 };
150 static const MCPhysReg LoRegList[] = { PPC::R4, PPC::R6, PPC::R8, PPC::R10 };
158 for (i = 0; i < std::size(HiRegList); ++i)
159 if (HiRegList[i] == Reg)
164 assert(
T == LoRegList[i] &&
"Could not allocate register");
178 static const MCPhysReg HiRegList[] = { PPC::R3 };
179 static const MCPhysReg LoRegList[] = { PPC::R4 };
187 for (i = 0; i < std::size(HiRegList); ++i)
188 if (HiRegList[i] == Reg)
197#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, MCRegister Reg, MVT LocVT, LocInfo HTP)
Wrapper class representing physical registers. Should be passed by value.
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.