accept multiple comma separated symbols for .globl/.global directives, like gas does

This commit is contained in:
Joe Soroka 2011-01-20 02:00:50 -08:00
parent 0a50e6c933
commit f43fafc680
2 changed files with 7 additions and 2 deletions

View file

@ -481,7 +481,7 @@ static void asm_parse_directive(TCCState *s1)
break; break;
case TOK_ASM_globl: case TOK_ASM_globl:
case TOK_ASM_global: case TOK_ASM_global:
{ do {
Sym *sym; Sym *sym;
next(); next();
@ -492,7 +492,7 @@ static void asm_parse_directive(TCCState *s1)
} }
sym->type.t &= ~VT_STATIC; sym->type.t &= ~VT_STATIC;
next(); next();
} } while (tok == ',');
break; break;
case TOK_ASM_string: case TOK_ASM_string:
case TOK_ASM_ascii: case TOK_ASM_ascii:

View file

@ -196,6 +196,11 @@ call *%eax
call *0x1000 call *0x1000
call func1 call func1
.global L5,L6
L5:
L6:
lcall $0x100, $0x1000 lcall $0x100, $0x1000
jmp 0x1000 jmp 0x1000