* gas/tic54x/align.s: Add comment.
[deliverable/binutils-gdb.git] / gas / testsuite / gas / tic54x / macro.s
CommitLineData
39bec121
TW
1* Macro test\r
2 .sslist\r
3 .text\r
4 .global abc, def, ghi, adr\r
5 \r
6* Macro library; load and use a macro in macros.lib\r
7 .mlib "macros.lib"\r
8\r
9 IN_MLIB abc,def,ghi\r
10\r
11add3 .macro P1,P2,P3,ADDRP\r
12 ld P1,a \r
13 add P2,a \r
14 add P3,a \r
15 stl a,ADDRP \r
16 .endm\r
17 add3 abc, def, ghi, adr\r
18 \r
19* Forced substitution within a macro\r
20force .macro x\r
21 .asg 0, x\r
22 .loop 8\r
23AUX:x: .set x\r
24 .eval x+1,x\r
25 .endloop \r
26 .endm\r
27 force\r
28 \r
29* Subsripted substitution symbols\r
30ADDX .macro ABC\r
31 .var TMP\r
32 .asg :ABC(1):,TMP \r
33 .if $symcmp(TMP,"#") == 0\r
34 ADD ABC,A\r
35 .else\r
36 .emsg "Bad macro parameter 'ABC'"\r
37 .endif\r
38 .endm\r
39 ADDX #100 ; ADD #100,A\r
40 .end\r
This page took 0.107814 seconds and 4 git commands to generate.