From 83f5cd87676e7693f00d07954c0ff0d12de2dc06 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 21 Aug 2026 15:45:23 +0100 Subject: [PATCH] Add extra check for scratch parameters with no other parameters --- src/check_asm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check_asm.cpp b/src/check_asm.cpp index 0429ed80d..3e48a0a9c 100644 --- a/src/check_asm.cpp +++ b/src/check_asm.cpp @@ -672,6 +672,10 @@ gb_internal void check_asm_specs(AsmCtx *asm_ctx, CheckerContext *ctx, Scope *sc } } + if (other_scratch == nullptr && check_asm_reg_class_from_type(type) != AsmRegClass_Unknown) { + ed.kind = AsmTemplateEntityDecl_Register; + } + array_add(asm_template_entity_decls, ed); } else { TokenPos pos = found->token.pos;