17 "stackmap and patchpoint intrinsics.");
32 static const MCPhysReg ELF64ArgGPRs[] = {PPC::X3, PPC::X4, PPC::X5, PPC::X6,
33 PPC::X7, PPC::X8, PPC::X9, PPC::X10};
34 const unsigned ELF64NumArgGPRs = std::size(ELF64ArgGPRs);
37 if (FirstUnallocGPR == ELF64NumArgGPRs)
43 if (LocVT == MVT::f32 || LocVT == MVT::f64)
51 if ((State.
AllocateReg(ELF64ArgGPRs) - PPC::X3) % 2 == 1)
71 PPC::R3, PPC::R4, PPC::R5, PPC::R6,
72 PPC::R7, PPC::R8, PPC::R9, PPC::R10,
74 const unsigned NumArgRegs = std::size(ArgRegs);
82 if (RegNum != NumArgRegs && RegNum % 2 == 1) {
96 PPC::R3, PPC::R4, PPC::R5, PPC::R6,
97 PPC::R7, PPC::R8, PPC::R9, PPC::R10,
99 const unsigned NumArgRegs = std::size(ArgRegs);
102 int RegsLeft = NumArgRegs - RegNum;
106 if (RegNum != NumArgRegs && RegsLeft < 4) {
107 for (
int i = 0; i < RegsLeft; i++) {
121 PPC::F1, PPC::F2, PPC::F3, PPC::F4, PPC::F5, PPC::F6, PPC::F7,
125 const unsigned NumArgRegs = std::size(ArgRegs);
131 if (RegNum != NumArgRegs && ArgRegs[RegNum] == PPC::F8) {
148 static const MCPhysReg HiRegList[] = { PPC::R3, PPC::R5, PPC::R7, PPC::R9 };
149 static const MCPhysReg LoRegList[] = { PPC::R4, PPC::R6, PPC::R8, PPC::R10 };
157 for (i = 0; i < std::size(HiRegList); ++i)
158 if (HiRegList[i] == Reg)
163 assert(
T == LoRegList[i] &&
"Could not allocate register");
177 static const MCPhysReg HiRegList[] = { PPC::R3 };
178 static const MCPhysReg LoRegList[] = { PPC::R4 };
186 for (i = 0; i < std::size(HiRegList); ++i)
187 if (HiRegList[i] == Reg)
196#include "PPCGenCallingConv.inc"
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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)
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.