tcc is now able to compile many asm files generated by gcc -- By by ... Detlef
Unified · Split
| @@ -555,6 +555,24 @@ static void asm_parse_directive(TCCState *s1) · 554 unmodified lines | ||
| 555 | 555 | next(); |
| 556 | 556 | } |
| 557 | 557 | break; |
| 558 | + case TOK_ASM_ident: | |
| 559 | + { | |
| 560 | + char ident[256]; | |
| 561 | + | |
| 562 | + ident[0] = '\0'; | |
| 563 | + next(); | |
| 564 | + | |
| 565 | + if (tok == TOK_STR) | |
| 566 | + pstrcat(ident, sizeof(ident), tokc.cstr->data); | |
| 567 | + else | |
| 568 | + pstrcat(ident, sizeof(ident), get_tok_str(tok, NULL)); | |
| 569 | + | |
| 570 | + if (s1->warn_unsupported) | |
| 571 | + warning("ignoring .ident %s", ident); | |
| 572 | + | |
| 573 | + next(); | |
| 574 | + } | |
| 575 | + break; | |
| 558 | 576 | case TOK_ASM_size: |
| 559 | 577 | { |
| 560 | 578 | Sym *sym; |
| @@ -252,6 +252,7 @@ · 251 unmodified lines | ||
| 252 | 252 | DEF_ASM(file) |
| 253 | 253 | DEF_ASM(globl) |
| 254 | 254 | DEF_ASM(global) |
| 255 | + DEF_ASM(ident) | |
| 255 | 256 | DEF_ASM(size) |
| 256 | 257 | DEF_ASM(type) |
| 257 | 258 | DEF_ASM(text) |