-- By by ... Detlef
Unified · Split
| @@ -691,8 +691,11 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess) · 690 unmodified lines | ||
| 691 | 691 | opcode = tok; |
| 692 | 692 | next(); |
| 693 | 693 | if (tok == ':') { |
| 694 | + char * label = get_tok_str(opcode, NULL); | |
| 695 | + | |
| 694 | 696 | /* new label */ |
| 695 | − asm_new_label(s1, opcode, 0); | |
| 697 | + asm_new_label(s1, opcode, | |
| 698 | + (label && label[0] == '.' && label[1] == 'L') ? 1 : 0); | |
| 696 | 699 | next(); |
| 697 | 700 | goto redo; |
| 698 | 701 | } else if (tok == '=') { |
| @@ -2279,6 +2279,12 @@ maybe_newline: · 2278 unmodified lines | ||
| 2279 | 2279 | tok = TOK_PPNUM; |
| 2280 | 2280 | break; |
| 2281 | 2281 | case '.': |
| 2282 | + /* check first for a local label (.Lxx:) */ | |
| 2283 | + if (p[1] == 'L') { | |
| 2284 | + /* fast case */ | |
| 2285 | + goto parse_ident_fast; | |
| 2286 | + } | |
| 2287 | + | |
| 2282 | 2288 | /* special dot handling because it can also start a number */ |
| 2283 | 2289 | PEEKC(c, p); |
| 2284 | 2290 | if (isnum(c)) { |