[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 15:54:16 PDT 2024
================
@@ -4768,6 +4768,25 @@ 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;
+ if (VectorLength < 128 || VectorLength > 65536) {
----------------
topperc wrote:
The C-API spec say 32 and 64 are allowed.
https://github.com/llvm/llvm-project/pull/100346
More information about the llvm-commits
mailing list