This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / gas / testsuite / gas / tic54x / labels.s
CommitLineData
39bec121
TW
1* local labels\r
2* two forms, $[0-9] and label? are allowed \r
3* Local labels are undefined/reset in one of four ways:\r
4* .newblock\r
5* changing sections \r
6* entering an include file\r
7* leaving an include file \r
8 .global addra, addrb, addrc\r
9label1: ld addra,a\r
10 sub addrb,a\r
11 bc $1, alt ; generates frag! \r
12 ld addrb, a\r
13 b $2\r
14$1: ld addra,a \r
15$2 add addrc,a\r
16 .newblock\r
17 bc $1,alt\r
18 stl a, addrc\r
19$1 nop \r
20 \r
21* #1, First definition of local label 'lab' \r
22 nop\r
23lab? add #1,a ; reports as line 17?\r
24 b lab? \r
25* #2, Included file also defines local label 'lab' \r
26 .copy labels.inc\r
27* #3, Next definition; exit from .copy clears all locals \r
28lab? add #3,a ; reports as line 22?\r
29 b lab?\r
30* #4, Next definition is within macro; supersedes previous definition while\r
31* within the macro \r
32mac .macro\r
33lab? add #4,a ; line 31?\r
34 b lab?\r
35 .endm\r
36* Macro invocation\r
37 mac\r
38* This reference should resolve to definition #3\r
39after_macro: \r
40 b lab?\r
41* Section change clears all definitions\r
42 .sect new_section\r
43 nop\r
44lab? add #5,a\r
45 nop\r
46 nop\r
47 b lab?\r
48* Newblock directive clears local labels\r
49 .newblock\r
50lab? add #6,a\r
51 nop\r
52 nop\r
53 b lab? \r
54 .end\r
55\r
This page took 0.02493 seconds and 4 git commands to generate.