3.2.1.7 -am
-am
expands macros in a listing. The first example
shows a listing where the -am
option was not used. The second example
shows a listing for the same source where the -am
option was used.
Listing File Generated with -al Command Line Option
Listing: example2.5.s page 1
1 .text
2 .macro div_s reg1, reg2
3 repeat #18-1
4 div.sw \reg1,\reg2
5 .endm
6
7 .macro div_u reg1, reg2
8 repeat #18-1
9 div.uw \reg1,\reg2
10 .endm
11
12 000000 40 01 20 mov #20, w0
13 000002 52 00 20 mov #5, w2
14 000004 11 00 09 div_u w0, w2
14 02 80 D8
15
16 000008 00 02 BE mov.d w0, w4
17
18 00000a 40 01 20 mov #20, w0
19 00000c B3 FF 2F mov #-5, w3
20 00000e 11 00 09 div_s w0, w3
20 03 00 D8
Listing File Generated with -alm Command Line Option
Listing: example2.6.s page 1
1 .text
2 .macro div_s reg1, reg2
3 repeat #18-1
4 div.sw \reg1,\reg2
5 .endm
6
7 .macro div_u reg1, reg2
8 repeat #18-1
9 div.uw \reg1,\reg2
10 .endm
11
12 000000 40 01 20 mov #20, w0
13 000002 52 00 20 mov #5, w2
14 div_u w0, w2
14 000004 11 00 09 > repeat #18-1
14 000006 02 80 D8 > div.uw w0,w2
15
16 000008 00 02 BE mov.d w0, w4
17
18 00000a 40 01 20 mov #20, w0
19 00000c B3 FF 2F mov #-5, w3
20 div_s w0, w3
20 00000e 11 00 09 > repeat #18-1
20 000010 03 00 D8 > div.sw w0,w3
Note: > signifies expanded macro instructions.