Add extra check for scratch parameters with no other parameters

This commit is contained in:
gingerBill
2026-08-21 15:45:23 +01:00
parent 2ba79e2f17
commit 83f5cd8767

View File

@@ -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;