[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] '.' as code position in asm_expr_unary()
From: |
Sergey Korshunoff |
Subject: |
Re: [Tinycc-devel] '.' as code position in asm_expr_unary() |
Date: |
Mon, 18 Apr 2016 20:42:50 +0300 |
> But this label must be handled in a special way.
My current solution:
diff -urN tinycc.old/tccasm.c tinycc/tccasm.c
--- tinycc.old/tccasm.c>2016-04-18 20:32:33.000000000 +0300
+++ tinycc/tccasm.c<--->2016-04-18 20:33:47.000000000 +0300
@@ -117,6 +117,11 @@
} else {
pe->v = 0;
pe->sym = sym;
+ if (!strcmp(".",get_tok_str(tok, 0))) {
+ sym->type.t = VT_STATIC | VT_VOID;
+ sym->r = cur_text_section->sh_num;
+ sym->jnext = ind;
+ }
}
next();
} else {
But I don't like call get_tok_str() for each asm identifier.