History

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

Joe Soroka committed 15 years ago

Commit f43fafc1 parent 0a50e6c2 files · +7 −2Browse files

Unified · Split

2 files
  1. tccasm.c +2 −2
  2. tests/asmtest.S +5 −0
tccasm.c+2−2
@@ -481,7 +481,7 @@ static void asm_parse_directive(TCCState *s1) · 480 unmodified lines
481481 break;
482482 case TOK_ASM_globl:
483483 case TOK_ASM_global:
484− {
484+ do {
485485 Sym *sym;
486486
487487 next();
@@ -492,7 +492,7 @@ static void asm_parse_directive(TCCState *s1) · 4 unmodified lines
492492 }
493493 sym->type.t &= ~VT_STATIC;
494494 next();
495− }
495+ } while (tok == ',');
496496 break;
497497 case TOK_ASM_string:
498498 case TOK_ASM_ascii:
tests/asmtest.S+5−0
@@ -196,6 +196,11 @@ call *%eax · 195 unmodified lines
196196 call *0x1000
197197 call func1
198198
199+.global L5,L6
200+
201+L5:
202+L6:
203+
199204 lcall $0x100, $0x1000
200205
201206 jmp 0x1000

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t