Including labels, directives and section names
Unified · Split
| @@ -2550,15 +2550,12 @@ maybe_newline: · 2549 unmodified lines | ||
| 2550 | 2550 | cstr_reset(&tokcstr); |
| 2551 | 2551 | cstr_ccat(&tokcstr, '.'); |
| 2552 | 2552 | goto parse_num; |
| 2553 | − } else if (c == '.') { | |
| 2554 | − PEEKC(c, p); | |
| 2555 | − if (c == '.') { | |
| 2556 | − p++; | |
| 2557 | − tok = TOK_DOTS; | |
| 2558 | − } else { | |
| 2559 | − *--p = '.'; /* may underflow into file->unget[] */ | |
| 2560 | − tok = '.'; | |
| 2561 | − } | |
| 2553 | + } else if ((isidnum_table['.' - CH_EOF] & IS_ID) != 0) { /* asm mode */ | |
| 2554 | + *--p = c = '.'; | |
| 2555 | + goto parse_ident_fast; | |
| 2556 | + } else if (c == '.' && p[1] == '.') { | |
| 2557 | + p += 2; | |
| 2558 | + tok = TOK_DOTS; | |
| 2562 | 2559 | } else { |
| 2563 | 2560 | tok = '.'; |
| 2564 | 2561 | } |
| @@ -3342,8 +3339,9 @@ ST_FUNC void preprocess_init(TCCState *s1) · 777 unmodified lines | ||
| 3342 | 3339 | s1->pack_stack[0] = 0; |
| 3343 | 3340 | s1->pack_stack_ptr = s1->pack_stack; |
| 3344 | 3341 | |
| 3345 | − isidnum_table['$' - CH_EOF] = | |
| 3342 | + isidnum_table['$' - CH_EOF] = (parse_flags & PARSE_FLAG_ASM_FILE) || | |
| 3346 | 3343 | tcc_state->dollars_in_identifiers ? IS_ID : 0; |
| 3344 | + isidnum_table['.' - CH_EOF] = (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0; | |
| 3347 | 3345 | } |
| 3348 | 3346 | |
| 3349 | 3347 | ST_FUNC void preprocess_new(void) |