Path: blob/main/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVCallingConv.h
213799 views
//===-- RISCVCallingConv.h - RISC-V Custom CC Routines ----------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file defines the custom routines for the RISC-V Calling Convention.9//10//===----------------------------------------------------------------------===//1112#include "MCTargetDesc/RISCVBaseInfo.h"13#include "llvm/CodeGen/CallingConvLower.h"1415namespace llvm {1617/// RISCVCCAssignFn - This target-specific function extends the default18/// CCValAssign with additional information used to lower RISC-V calling19/// conventions.20typedef bool RISCVCCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT,21CCValAssign::LocInfo LocInfo,22ISD::ArgFlagsTy ArgFlags, CCState &State,23bool IsFixed, bool IsRet, Type *OrigTy);2425bool CC_RISCV(unsigned ValNo, MVT ValVT, MVT LocVT,26CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,27CCState &State, bool IsFixed, bool IsRet, Type *OrigTy);2829bool CC_RISCV_FastCC(unsigned ValNo, MVT ValVT, MVT LocVT,30CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,31CCState &State, bool IsFixed, bool IsRet, Type *OrigTy);3233bool CC_RISCV_GHC(unsigned ValNo, MVT ValVT, MVT LocVT,34CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,35CCState &State);3637namespace RISCV {3839ArrayRef<MCPhysReg> getArgGPRs(const RISCVABI::ABI ABI);4041} // end namespace RISCV4243} // end namespace llvm444546