55 if (!
f64AssignAPCS(ValNo, ValVT, LocVT, LocInfo, State,
true))
68 static const MCPhysReg LoRegList[] = { ARM::R1, ARM::R3 };
69 static const MCPhysReg ShadowRegList[] = { ARM::R0, ARM::R1 };
77 assert((!Reg || Reg == ARM::R3) &&
"Wrong GPRs usage for f64");
91 for (i = 0; i < 2; ++i)
92 if (HiRegList[i] == Reg)
97 assert(T == LoRegList[i] &&
"Could not allocate register");
120 static const MCPhysReg LoRegList[] = { ARM::R1, ARM::R3 };
127 for (i = 0; i < 2; ++i)
128 if (HiRegList[i] == Reg)
159 ARM::S4, ARM::S5, ARM::S6, ARM::S7,
160 ARM::S8, ARM::S9, ARM::S10, ARM::S11,
161 ARM::S12, ARM::S13, ARM::S14, ARM::S15 };
163 ARM::D4, ARM::D5, ARM::D6, ARM::D7 };
180 if (PendingMembers.
size() > 0)
181 assert(PendingMembers[0].getLocVT() == LocVT);
197 unsigned Align = std::min(PendingMembers[0].getExtraInfo(), StackAlign);
207 unsigned RegAlign =
alignTo(Align, 4) / 4;
208 while (RegIdx % RegAlign != 0 && RegIdx < RegList.
size())
233 It != PendingMembers.
end(); ++It) {
234 It->convertToReg(RegResult);
238 PendingMembers.
clear();
248 for (
auto &It : PendingMembers) {
249 if (RegIdx >= RegList.
size())
252 It.convertToReg(State.
AllocateReg(RegList[RegIdx++]));
256 PendingMembers.clear();
262 for (
auto Reg : RegList)
268 unsigned RestAlign = std::min(Align, Size);
270 for (
auto &It : PendingMembers) {
277 PendingMembers.clear();
284 #include "ARMGenCallingConv.inc"
unsigned getFirstUnallocated(ArrayRef< MCPhysReg > Regs) const
getFirstUnallocated - Return the index of the first unallocated register in the set, or Regs.size() if they are all allocated.
static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, LocInfo HTP, unsigned ExtraInfo=0)
static bool f64AssignAPCS(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State, bool CanFail)
static CCValAssign getCustomReg(unsigned ValNo, MVT ValVT, unsigned RegNo, MVT LocVT, LocInfo HTP)
static bool f64AssignAAPCS(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State, bool CanFail)
This class represents lattice values for constants.
Align getStackAlignment() const
void push_back(const T &Elt)
TypeSize getSizeInBits() const
Returns the size of the specified MVT in bits.
MachineFunction & getMachineFunction() const
static bool CC_ARM_APCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static const MCPhysReg SRegList[]
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void addLoc(const CCValAssign &V)
unsigned getNextStackOffset() const
getNextStackOffset - Return the next stack offset such that all stack slots satisfy their alignment r...
SmallVectorImpl< CCValAssign > & getPendingLocs()
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
uint64_t value() const
This is a hole in the type system and should not be abused.
static const MCPhysReg GPRArgRegs[]
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
static const MCPhysReg DRegList[]
unsigned getOrigAlign() const
static bool CC_ARM_AAPCS_Custom_Aggregate(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
size_t size() const
size - Get the array size.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This struct is a compact representation of a valid (non-zero power of two) alignment.
static bool RetCC_ARM_APCS_Custom_f64(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 AllocateRegBlock(ArrayRef< MCPhysReg > Regs, unsigned RegsRequired)
AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive registers.
typename SuperClass::iterator iterator
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
unsigned AllocateStack(unsigned Size, unsigned Alignment)
AllocateStack - Allocate a chunk of stack space with the specified size and alignment.
bool isInConsecutiveRegsLast() const
static CCValAssign getCustomMem(unsigned ValNo, MVT ValVT, unsigned Offset, MVT LocVT, LocInfo HTP)
static bool f64RetAssign(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, CCState &State)
static bool CC_ARM_AAPCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool RetCC_ARM_AAPCS_Custom_f64(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
static const MCPhysReg QRegList[]
unsigned AllocateReg(unsigned Reg)
AllocateReg - Attempt to allocate one register.
static const MCPhysReg RRegList[]