Templatize the check_asm.cpp code ready for other architectures

This commit is contained in:
gingerBill
2026-08-11 14:00:41 +01:00
parent 813f732759
commit ef21ffa285
6 changed files with 122 additions and 86 deletions

View File

@@ -2065,7 +2065,11 @@ gb_internal void check_entity_decl(CheckerContext *ctx, Entity *e, DeclInfo *d,
break;
case Entity_AsmTemplate:
check_asm_template(&c, e, d);
if (build_context.metrics.arch == TargetArch_amd64) {
check_asm_template(&g_asm_amd64, &c, e, d);
} else {
error(e->token, "asm templates are not currently supported for this target");
}
break;
}