#include "ABIInfoImpl.h"
#include "TargetInfo.h"
usingnamespaceclang;
usingnamespaceclang::CodeGen;
namespace {
class LoongArchABIInfo : public DefaultABIInfo { … };
}
void LoongArchABIInfo::computeInfo(CGFunctionInfo &FI) const { … }
bool LoongArchABIInfo::detectFARsEligibleStructHelper(
QualType Ty, CharUnits CurOff, llvm::Type *&Field1Ty, CharUnits &Field1Off,
llvm::Type *&Field2Ty, CharUnits &Field2Off) const { … }
bool LoongArchABIInfo::detectFARsEligibleStruct(
QualType Ty, llvm::Type *&Field1Ty, CharUnits &Field1Off,
llvm::Type *&Field2Ty, CharUnits &Field2Off, int &NeededGARs,
int &NeededFARs) const { … }
ABIArgInfo LoongArchABIInfo::coerceAndExpandFARsEligibleStruct(
llvm::Type *Field1Ty, CharUnits Field1Off, llvm::Type *Field2Ty,
CharUnits Field2Off) const { … }
ABIArgInfo LoongArchABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
int &GARsLeft,
int &FARsLeft) const { … }
ABIArgInfo LoongArchABIInfo::classifyReturnType(QualType RetTy) const { … }
RValue LoongArchABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
QualType Ty, AggValueSlot Slot) const { … }
ABIArgInfo LoongArchABIInfo::extendType(QualType Ty) const { … }
namespace {
class LoongArchTargetCodeGenInfo : public TargetCodeGenInfo { … };
}
std::unique_ptr<TargetCodeGenInfo>
CodeGen::createLoongArchTargetCodeGenInfo(CodeGenModule &CGM, unsigned GRLen,
unsigned FLen) { … }