[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 22:00:54 PDT 2024
================
@@ -4768,6 +4768,15 @@ static void handleCallConvAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
case ParsedAttr::AT_RISCVVectorCC:
D->addAttr(::new (S.Context) RISCVVectorCCAttr(S.Context, AL));
return;
+ case ParsedAttr::AT_RISCVVLSCC: {
+ // If the riscv_abi_vlen doesn't have any argument, default ABI_VLEN is 128.
+ unsigned VectorLength = 128;
+ if (AL.getNumArgs() &&
+ !S.checkUInt32Argument(AL, AL.getArgAsExpr(0), VectorLength))
+ return;
----------------
topperc wrote:
Do we validate that the VectorLength is a legal value anywhere?
https://github.com/llvm/llvm-project/pull/100346
More information about the cfe-commits
mailing list