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
555555 next();
556556 }
557557 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;
558576 case TOK_ASM_size:
559577 {
560578 Sym *sym;
tcctok.h+1−0
@@ -252,6 +252,7 @@ · 251 unmodified lines
252252 DEF_ASM(file)
253253 DEF_ASM(globl)
254254 DEF_ASM(global)
255+ DEF_ASM(ident)
255256 DEF_ASM(size)
256257 DEF_ASM(type)
257258 DEF_ASM(text)