Some patches, to allow tcc to compile asm sources generated by gcc and help tcc with the autoconf stuff used in Wine ( http://source.winehq.org/git/wine.git/ ) -- By by ... Detlef
Unified · Split
| @@ -537,6 +537,24 @@ static void asm_parse_directive(TCCState *s1) · 536 unmodified lines | |||
| 537 | use_section(s1, sname); | 537 | use_section(s1, sname); |
| 538 | } | 538 | } |
| 539 | break; | 539 | break; |
| 540 | case TOK_ASM_file: | ||
| 541 | { | ||
| 542 | char filename[512]; | ||
| 543 | |||
| 544 | filename[0] = '\0'; | ||
| 545 | next(); | ||
| 546 | |||
| 547 | if (tok == TOK_STR) | ||
| 548 | pstrcat(filename, sizeof(filename), tokc.cstr->data); | ||
| 549 | else | ||
| 550 | pstrcat(filename, sizeof(filename), get_tok_str(tok, NULL)); | ||
| 551 | |||
| 552 | if (s1->warn_unsupported) | ||
| 553 | warning("ignoring .file %s", filename); | ||
| 554 | |||
| 555 | next(); | ||
| 556 | } | ||
| 557 | break; | ||
| 540 | case TOK_SECTION1: | 558 | case TOK_SECTION1: |
| 541 | { | 559 | { |
| 542 | char sname[256]; | 560 | char sname[256]; |
| @@ -249,6 +249,7 @@ · 248 unmodified lines | |||
| 249 | DEF_ASM(string) | 249 | DEF_ASM(string) |
| 250 | DEF_ASM(asciz) | 250 | DEF_ASM(asciz) |
| 251 | DEF_ASM(ascii) | 251 | DEF_ASM(ascii) |
| 252 | DEF_ASM(file) | ||
| 252 | DEF_ASM(globl) | 253 | DEF_ASM(globl) |
| 253 | DEF_ASM(global) | 254 | DEF_ASM(global) |
| 254 | DEF_ASM(text) | 255 | DEF_ASM(text) |