History

tccasm: Detect (but ignore) .ident directive

tcc is now able to compile many asm files generated by gcc -- By by ... Detlef

Detlef Riekenberg committed 16 years ago

Commit a135dd51 parent 558258a2 files · +19 −0Browse files

Unified · Split

2 files
  1. tccasm.c +18 −0
  2. tcctok.h +1 −0
tccasm.c+18−0
@@ -555,6 +555,24 @@ static void asm_parse_directive(TCCState *s1) · 554 unmodified lines
555 next();555 next();
556 }556 }
557 break;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 case TOK_ASM_size:576 case TOK_ASM_size:
559 { 577 {
560 Sym *sym;578 Sym *sym;
tcctok.h+1−0
@@ -252,6 +252,7 @@ · 251 unmodified lines
252 DEF_ASM(file)252 DEF_ASM(file)
253 DEF_ASM(globl)253 DEF_ASM(globl)
254 DEF_ASM(global)254 DEF_ASM(global)
255 DEF_ASM(ident)
255 DEF_ASM(size)256 DEF_ASM(size)
256 DEF_ASM(type)257 DEF_ASM(type)
257 DEF_ASM(text)258 DEF_ASM(text)