History

tccasm: Detect (but ignore) the .file directive

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

Detlef Riekenberg committed 16 years ago

Commit 9ff7a0b1 parent 197a6ac2 files · +19 −0Browse files

Unified · Split

2 files
  1. tccasm.c +18 −0
  2. tcctok.h +1 −0
tccasm.c+18−0
@@ -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];
tcctok.h+1−0
@@ -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)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t