23 static const MCPhysReg RegList[] = { ARM::R0, ARM::R1, ARM::R2, ARM::R3 };
52 if (!
f64AssignAPCS(ValNo, ValVT, LocVT, LocInfo, State,
true))
54 if (LocVT == MVT::v2f64 &&
64 static const MCPhysReg HiRegList[] = { ARM::R0, ARM::R2 };
65 static const MCPhysReg LoRegList[] = { ARM::R1, ARM::R3 };
66 static const MCPhysReg ShadowRegList[] = { ARM::R0, ARM::R1 };
74 assert((!Reg || Reg == ARM::R3) &&
"Wrong GPRs usage for f64");
87 for (i = 0; i < 2; ++i)
88 if (HiRegList[i] == Reg)
93 assert(
T == LoRegList[i] &&
"Could not allocate register");
107 if (LocVT == MVT::v2f64 &&
115 static const MCPhysReg HiRegList[] = { ARM::R0, ARM::R2 };
116 static const MCPhysReg LoRegList[] = { ARM::R1, ARM::R3 };
123 for (i = 0; i < 2; ++i)
124 if (HiRegList[i] == Reg)
139 if (LocVT == MVT::v2f64 && !
f64RetAssign(ValNo, ValVT, LocVT, LocInfo, State))
155 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
156 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
157 ARM::S12, ARM::S13, ARM::S14, ARM::S15 };
159 ARM::D4, ARM::D5, ARM::D6, ARM::D7 };
176 if (PendingMembers.
size() > 0)
177 assert(PendingMembers[0].getLocVT() == LocVT);
193 assert(StackAlign &&
"data layout string is missing stack alignment");
194 const Align FirstMemberAlign(PendingMembers[0].getExtraInfo());
195 Align Alignment = std::min(FirstMemberAlign, *StackAlign);
206 while (RegIdx % RegAlign != 0 && RegIdx < RegList.
size())
233 for (
CCValAssign &PendingMember : PendingMembers) {
234 PendingMember.convertToReg(RegResult);
235 State.
addLoc(PendingMember);
238 PendingMembers.clear();
248 for (
auto &It : PendingMembers) {
249 if (RegIdx >= RegList.
size())
252 It.convertToReg(State.
AllocateReg(RegList[RegIdx++]));
256 PendingMembers.clear();
260 if (LocVT != MVT::i32)
264 for (
auto Reg : RegList)
274 for (
auto &It : PendingMembers) {
277 Alignment =
Align(1);
281 PendingMembers.
clear();
316#include "ARMGenCallingConv.inc"
static const MCPhysReg GPRArgRegs[]
static bool CC_ARM_AAPCS_VFP_Custom_f16(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static bool f64RetAssign(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State)
static const MCPhysReg RRegList[]
static bool RetCC_ARM_AAPCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static const MCPhysReg SRegList[]
static bool CC_ARM_AAPCS_Custom_Aggregate(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static bool f64AssignAAPCS(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State, bool CanFail)
static const MCPhysReg DRegList[]
static bool RetCC_ARM_APCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static bool CC_ARM_AAPCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static bool f64AssignAPCS(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State, bool CanFail)
static const MCPhysReg QRegList[]
static bool CC_ARM_AAPCS_Custom_f16(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static bool CC_ARM_APCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static bool CustomAssignInRegList(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State, ArrayRef< MCPhysReg > RegList)
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isTargetAEABI() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
CCState - This class holds information needed while lowering arguments and return values.
MachineFunction & getMachineFunction() const
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.
MCPhysReg AllocateRegBlock(ArrayRef< MCPhysReg > Regs, unsigned RegsRequired)
AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive registers.
int64_t AllocateStack(unsigned Size, Align Alignment)
AllocateStack - Allocate a chunk of stack space with the specified size and alignment.
uint64_t getStackSize() const
Returns the size of the currently allocated portion of the stack.
SmallVectorImpl< CCValAssign > & getPendingLocs()
void addLoc(const CCValAssign &V)
CCValAssign - Represent assignment of one arg/retval to a location.
static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, LocInfo HTP, unsigned ExtraInfo=0)
static CCValAssign getCustomReg(unsigned ValNo, MVT ValVT, MCRegister Reg, MVT LocVT, LocInfo HTP)
static CCValAssign getCustomMem(unsigned ValNo, MVT ValVT, int64_t Offset, MVT LocVT, LocInfo HTP)
Wrapper class representing physical registers. Should be passed by value.
TypeSize getSizeInBits() const
Returns the size of the specified MVT in bits.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
#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.
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
This struct is a compact representation of a valid (non-zero power of two) alignment.
uint64_t value() const
This is a hole in the type system and should not be abused.
Align getNonZeroOrigAlign() const
bool isInConsecutiveRegsLast() const
Align getNonZeroMemAlign() const
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.