#include "ABIInfoImpl.h"
#include "TargetInfo.h"
usingnamespaceclang;
usingnamespaceclang::CodeGen;
namespace {
class RISCVABIInfo : public DefaultABIInfo { … };
}
void RISCVABIInfo::appendAttributeMangling(TargetClonesAttr *Attr,
unsigned Index,
raw_ostream &Out) const { … }
void RISCVABIInfo::appendAttributeMangling(StringRef AttrStr,
raw_ostream &Out) const { … }
void RISCVABIInfo::computeInfo(CGFunctionInfo &FI) const { … }
bool RISCVABIInfo::detectFPCCEligibleStructHelper(QualType Ty, CharUnits CurOff,
llvm::Type *&Field1Ty,
CharUnits &Field1Off,
llvm::Type *&Field2Ty,
CharUnits &Field2Off) const { … }
bool RISCVABIInfo::detectFPCCEligibleStruct(QualType Ty, llvm::Type *&Field1Ty,
CharUnits &Field1Off,
llvm::Type *&Field2Ty,
CharUnits &Field2Off,
int &NeededArgGPRs,
int &NeededArgFPRs) const { … }
ABIArgInfo RISCVABIInfo::coerceAndExpandFPCCEligibleStruct(
llvm::Type *Field1Ty, CharUnits Field1Off, llvm::Type *Field2Ty,
CharUnits Field2Off) const { … }
ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { … }
ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
int &ArgGPRsLeft,
int &ArgFPRsLeft) const { … }
ABIArgInfo RISCVABIInfo::classifyReturnType(QualType RetTy) const { … }
RValue RISCVABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
QualType Ty, AggValueSlot Slot) const { … }
ABIArgInfo RISCVABIInfo::extendType(QualType Ty, llvm::Type *CoerceTy) const { … }
namespace {
class RISCVTargetCodeGenInfo : public TargetCodeGenInfo { … };
}
std::unique_ptr<TargetCodeGenInfo>
CodeGen::createRISCVTargetCodeGenInfo(CodeGenModule &CGM, unsigned XLen,
unsigned FLen, bool EABI) { … }