-- By by ... Detlef
Unified · Split
| @@ -691,8 +691,11 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess) · 690 unmodified lines | |||
| 691 | opcode = tok; | 691 | opcode = tok; |
| 692 | next(); | 692 | next(); |
| 693 | if (tok == ':') { | 693 | if (tok == ':') { |
| 694 | char * label = get_tok_str(opcode, NULL); | ||
| 695 | |||
| 694 | /* new label */ | 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 | next(); | 699 | next(); |
| 697 | goto redo; | 700 | goto redo; |
| 698 | } else if (tok == '=') { | 701 | } else if (tok == '=') { |
| @@ -2279,6 +2279,12 @@ maybe_newline: · 2278 unmodified lines | |||
| 2279 | tok = TOK_PPNUM; | 2279 | tok = TOK_PPNUM; |
| 2280 | break; | 2280 | break; |
| 2281 | case '.': | 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 | /* special dot handling because it can also start a number */ | 2288 | /* special dot handling because it can also start a number */ |
| 2283 | PEEKC(c, p); | 2289 | PEEKC(c, p); |
| 2284 | if (isnum(c)) { | 2290 | if (isnum(c)) { |