Lines Matching +full:xlen +full:- +full:1

1 //===- CSKY.cpp -----------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
15 //===----------------------------------------------------------------------===//
17 //===----------------------------------------------------------------------===//
23 static const unsigned XLen = 32; member in __anond0a0cca10111::CSKYABIInfo
52 int ArgGPRsLeft = IsRetIndirect ? NumArgGPRs - 1 : NumArgGPRs; in computeInfo()
62 CharUnits SlotSize = CharUnits::fromQuantity(XLen / 8); in EmitVAArg()
80 // Structures with either a non-trivial destructor or a non-trivial in classifyArgumentType()
84 ArgGPRsLeft -= 1; in classifyArgumentType()
93 if (!Ty->getAsUnionType()) in classifyArgumentType()
99 if (Ty->isFloatingType() && !Ty->isComplexType() && FLen >= Size && in classifyArgumentType()
101 ArgFPRsLeft--; in classifyArgumentType()
107 if (Ty->isComplexType() && FLen && !isReturnType) { in classifyArgumentType()
108 QualType EltTy = Ty->castAs<ComplexType>()->getElementType(); in classifyArgumentType()
110 ArgFPRsLeft -= 2; in classifyArgumentType()
117 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
118 Ty = EnumTy->getDecl()->getIntegerType(); in classifyArgumentType()
120 // All integral types are promoted to XLen width, unless passed on the in classifyArgumentType()
122 if (Size < XLen && Ty->isIntegralOrEnumerationType()) in classifyArgumentType()
125 if (const auto *EIT = Ty->getAs<BitIntType>()) { in classifyArgumentType()
126 if (EIT->getNumBits() < XLen) in classifyArgumentType()
133 // For argument type, the first 4*XLen parts of aggregate will be passed in classifyArgumentType()
136 // For return type, aggregate which <= 2*XLen will be returned in registers. in classifyArgumentType()
138 if (!isReturnType || (isReturnType && Size <= 2 * XLen)) { in classifyArgumentType()
139 if (Size <= XLen) { in classifyArgumentType()
141 llvm::IntegerType::get(getVMContext(), XLen)); in classifyArgumentType()
144 llvm::IntegerType::get(getVMContext(), XLen), (Size + 31) / XLen)); in classifyArgumentType()
151 if (RetTy->isVoidType()) in classifyReturnType()
155 int ArgFPRsLeft = FLen ? 1 : 0; in classifyReturnType()