Allow for inlineable asm calls

This commit is contained in:
gingerBill
2026-08-18 14:57:34 +01:00
parent 0bc9e60725
commit a86e523053
8 changed files with 30 additions and 12 deletions

View File

@@ -1681,4 +1681,12 @@ gb_internal void check_asm_template(AsmCtx *asm_ctx, CheckerContext *ctx, Entity
if (previous_prefix != 0) {
error(previous_prefix_instr, "A prefix must be immediately followed by an instruction, but the template ended");
}
}
gb_internal void check_asm_template_from_entity(CheckerContext *c, Entity *e, DeclInfo *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");
}
}