tccasm: Detect (but ignore) .size directive
-- By by ... Detlef
This commit is contained in:
parent
6825c5db72
commit
558258a301
2 changed files with 22 additions and 0 deletions
21
tccasm.c
21
tccasm.c
|
@ -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;
|
||||
|
|
1
tcctok.h
1
tcctok.h
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue