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
537537 use_section(s1, sname);
538538 }
539539 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;
540558 case TOK_SECTION1:
541559 {
542560 char sname[256];
tcctok.h+1−0
@@ -249,6 +249,7 @@ · 248 unmodified lines
249249 DEF_ASM(string)
250250 DEF_ASM(asciz)
251251 DEF_ASM(ascii)
252+ DEF_ASM(file)
252253 DEF_ASM(globl)
253254 DEF_ASM(global)
254255 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