aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2017-11-22 17:57:43 +0100
committerMichael Matz <matz@suse.de>2017-11-22 17:57:43 +0100
commite7c71e24730ae07241980812c8b747963f216260 (patch)
tree6fc0609791b351c7f83da07c3f8d2548d747094c /tcc.h
parent330c01bfc6fa6721fd455911a966bce041df31d8 (diff)
downloadtinycc-e7c71e24730ae07241980812c8b747963f216260.tar.gz
tinycc-e7c71e24730ae07241980812c8b747963f216260.tar.bz2
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.
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index da26298..1efd046 100644
--- a/tcc.h
+++ b/tcc.h
@@ -383,6 +383,7 @@ typedef struct TokenSym {
struct Sym *sym_label; /* direct pointer to label */
struct Sym *sym_struct; /* direct pointer to structure */
struct Sym *sym_identifier; /* direct pointer to identifier */
+ struct Sym *sym_asm_label; /* direct pointer to asm label */
int tok; /* token number */
int len;
char str[1];
@@ -1584,6 +1585,7 @@ ST_FUNC Sym* get_asm_sym(int name, Sym *csym);
ST_FUNC void asm_expr(TCCState *s1, ExprValue *pe);
ST_FUNC int asm_int_expr(TCCState *s1);
ST_FUNC int tcc_assemble(TCCState *s1, int do_preprocess);
+ST_FUNC void asm_free_labels(TCCState *st);
/* ------------ i386-asm.c ------------ */
ST_FUNC void gen_expr32(ExprValue *pe);
#ifdef TCC_TARGET_X86_64