From a9ae4fb5989aec75a055d315eaf3b01cbf6f255c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 8 Apr 2026 12:58:19 +0100 Subject: [PATCH] Macro out the ABI stuff --- src/llvm_abi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp index 2e1e505f2..d4dde2a3d 100644 --- a/src/llvm_abi.cpp +++ b/src/llvm_abi.cpp @@ -1,4 +1,5 @@ #define ALLOW_SPLIT_MULTI_RETURNS true +#define ALLOW_WIN64_VECTORCALL_ABI true enum lbArgKind { lbArg_Direct, @@ -142,7 +143,9 @@ gb_internal void lb_add_function_calling_convention(LLVMValueRef fn, ProcCalling switch (calling_convention) { case ProcCC_Odin: case ProcCC_Contextless: - cc_kind = lbCallingConvention_X86_VectorCall; + if (ALLOW_WIN64_VECTORCALL_ABI) { + cc_kind = lbCallingConvention_X86_VectorCall; + } break; } } @@ -486,7 +489,7 @@ namespace lbAbiAmd64Win64 { switch (calling_convention) { case ProcCC_Odin: case ProcCC_Contextless: - return true; + return ALLOW_WIN64_VECTORCALL_ABI; case ProcCC_VectorCall: return true; }