tccasm: Detect (but ignore) .size directive

--
By by ... Detlef
master
Detlef Riekenberg 2010-04-05 12:43:51 +02:00
parent 6825c5db72
commit 558258a301
2 changed files with 22 additions and 0 deletions

View File

@ -555,6 +555,27 @@ static void asm_parse_directive(TCCState *s1)
next();
}
break;
case TOK_ASM_size:
{
Sym *sym;
next();
sym = label_find(tok);
if (!sym) {
error("label not found: %s", get_tok_str(tok, NULL));
}
next();
skip(',');
/* XXX .size name,label2-label1 */
if (s1->warn_unsupported)
warning("ignoring .size %s,*", get_tok_str(tok, NULL));
while (tok != '\n' && tok != CH_EOF) {
next();
}
}
break;
case TOK_ASM_type:
{
Sym *sym;

View File

@ -252,6 +252,7 @@
DEF_ASM(file)
DEF_ASM(globl)
DEF_ASM(global)
DEF_ASM(size)
DEF_ASM(type)
DEF_ASM(text)
DEF_ASM(data)