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 divs.w \reg1,\reg2
5 .endm
6 .macro div_u reg1, reg2
7 repeat #18-1
8 divu.w \reg1,\reg2
9 .endm
10
11 000000 53 00 00 80 mov #20, w0
12 000004 17 00 00 88 mov #5, w2
12 1F 73 00 00
13 00000c 07 00 02 E8 div_u w0, w2
14 000010 40 03 00 00 mov.l w0, w4
15 000014 53 00 00 80 mov #20, w0
16 000018 EF FF FF 8F mov #-5, w3
16 1F 73 00 00
17 000020 03 00 03 E8 div_s w0, w3
Listing File Generated with -alm Command Line Option
Listing: example2.5.s page 1
1 .text
2 .macro div_s reg1, reg2
3 repeat #18-1
4 divs.w \reg1,\reg2
5 .endm
6 .macro div_u reg1, reg2
7 repeat #18-1
8 divu.w \reg1,\reg2
9 .endm
10
11 000000 53 00 00 80 mov #20, w0
12 000004 17 00 00 88 mov #5, w2
13 div_u w0, w2
13 000008 1F 73 00 00 > repeat #18-1
13 00000c 07 00 02 E8 > divu.w w0,w2
14 000010 40 03 00 00 mov.l w0, w4
15 000014 53 00 00 80 mov #20, w0
16 000018 EF FF FF 8F mov #-5, w3
17 div_s w0, w3
17 00001c 1F 73 00 00 > repeat #18-1
17 000020 03 00 03 E8 > divs.w w0,w3
Note: > signifies expanded macro instructions.