diff --git a/tccasm.c b/tccasm.c index 17c4e4b..3097876 100644 --- a/tccasm.c +++ b/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; diff --git a/tcctok.h b/tcctok.h index 8d5d748..7846b4e 100644 --- a/tcctok.h +++ b/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)