From e7c71e24730ae07241980812c8b747963f216260 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 22 Nov 2017 17:57:43 +0100 Subject: tccasm: synch C and asm symtab tighter See testcase. The C and asm symtab are still separate, but integrated tighter: the asm labels are only synched at file end, not after each asm snippet (this fixes references from one to another asm block), the C and asm syms are synched both ways, so defining things in asm and refering from C, or the other way around works. In effect this model reflects what happens with GCC better. For this the asm labels aren't using the C label namespace anymore, but their own, which increases the size of each TokenSym by a pointer. --- tccgen.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index 7d554b5..a86103c 100644 --- a/tccgen.c +++ b/tccgen.c @@ -275,6 +275,11 @@ ST_FUNC int tccgen_compile(TCCState *s1) decl(VT_CONST); gen_inline_functions(s1); check_vstack(); + +#ifdef CONFIG_TCC_ASM + asm_free_labels(s1); +#endif + /* end of translation unit info */ tcc_debug_end(s1); return 0; -- cgit v1.3.1