diff options
Diffstat (limited to 'tccasm.c')
| -rw-r--r-- | tccasm.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -915,8 +915,12 @@ static void asm_parse_directive(TCCState *s1) /* assemble a file */ static int tcc_assemble_internal(TCCState *s1, int do_preprocess) { + int saved_nocode_wanted; int opcode; + saved_nocode_wanted = nocode_wanted; + nocode_wanted = 0; + /* XXX: undefine C labels */ ch = file->buf_ptr[0]; @@ -960,7 +964,7 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess) /* handle "extern void vide(void); __asm__("vide: ret");" as "__asm__("globl vide\nvide: ret");" */ Sym *sym = sym_find(opcode); - if (sym && (sym->type.t & VT_EXTERN) && nocode_wanted) { + if (sym && (sym->type.t & VT_EXTERN) && saved_nocode_wanted) { sym = label_find(opcode); if (!sym) { sym = label_push(&s1->asm_labels, opcode, 0); @@ -989,6 +993,7 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess) asm_free_labels(s1); + nocode_wanted = saved_nocode_wanted; return 0; } |
