Minor fixes to labels; restrict to amd64 usage

This commit is contained in:
gingerBill
2026-08-10 13:21:14 +01:00
parent cee5bd79e0
commit 768fedcff4
3 changed files with 19 additions and 11 deletions

View File

@@ -2696,6 +2696,10 @@ gb_internal Ast *parse_asm_template(AstFile *f) {
asm_instructions = slice_from_array(instructions);
}
if (build_context.metrics.arch != TargetArch_amd64) {
syntax_error(token, "asm templates are currently only supported on -target:amd64");
}
Ast *asm_template = alloc_ast_node(f, Ast_AsmTemplate);
asm_template->AsmTemplate.token = token;
asm_template->AsmTemplate.has_side_effects = has_side_effects;