mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
test: add test for context-local labels and extern label promotion
Add a simple test case for context-local (%$) labels not disturbing the local variable namespace, and extern labels getting promoted to global. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
c5e45f6b70
commit
59242bd10a
25
test/ctxlocal.asm
Normal file
25
test/ctxlocal.asm
Normal file
@ -0,0 +1,25 @@
|
||||
;;
|
||||
;; Test of context-local labels
|
||||
;;
|
||||
|
||||
bits 64
|
||||
extern everywhere ; Test of extern -> global promotion, too
|
||||
extern tjosan
|
||||
here:
|
||||
jz .there
|
||||
%push foo
|
||||
jo %$mordor
|
||||
hlt
|
||||
%$mordor:
|
||||
nop
|
||||
%pop
|
||||
.there:
|
||||
ret
|
||||
|
||||
everywhere:
|
||||
ret
|
||||
|
||||
global everywhere
|
||||
|
||||
tjosan:
|
||||
ret
|
Loading…
x
Reference in New Issue
Block a user