diff options
| -rw-r--r-- | linearize.c | 8 | ||||
| -rw-r--r-- | sparse.c | 2 | ||||
| -rw-r--r-- | validation/linear/asm-toplevel.c (renamed from validation/asm-toplevel.c) | 0 |
3 files changed, 7 insertions, 3 deletions
diff --git a/linearize.c b/linearize.c index d657af82..441a4735 100644 --- a/linearize.c +++ b/linearize.c @@ -2429,12 +2429,16 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t return NULL; ep = alloc_entrypoint(); - bb = alloc_basic_block(ep, sym->pos); - ep->name = sym; sym->ep = ep; + bb = alloc_basic_block(ep, sym->pos); set_activeblock(ep, bb); + if (stmt->type == STMT_ASM) { // top-level asm + linearize_asm_statement(ep, stmt); + return ep; + } + entry = alloc_instruction(OP_ENTRY, 0); add_one_insn(ep, entry); ep->entry = entry; @@ -315,7 +315,7 @@ static void check_symbols(struct symbol_list *list) expand_symbol(sym); ep = linearize_symbol(sym); - if (ep) { + if (ep && ep->entry) { if (dbg_entry) show_entry(ep); diff --git a/validation/asm-toplevel.c b/validation/linear/asm-toplevel.c index 8bdd7fc1..8bdd7fc1 100644 --- a/validation/asm-toplevel.c +++ b/validation/linear/asm-toplevel.c |
