* gas/m68hc11/bug-1825.d (_table): Update.
[external/binutils.git] / gas / testsuite / gas / m68hc11 / bug-1825.d
1 #objdump: -S -r
2 #as: -m68hc12 -gdwarf2
3 #name: 68HC12 PC-relative addressing modes (bug-1825)
4
5 .*:     file format elf32\-m68hc12
6
7 Disassembly of section \.text:
8
9 0+ <_main>:
10 ;;; 
11         \.sect \.text
12         \.globl _main
13 _main:
14         nop
15    0:   a7              nop
16         ldx     L1,pc           ; Assemble to 5\-bit > 0 offset
17    1:   ee c2           ldx     2,PC \{5 <L1>\}
18         bra     L2
19    3:   20 02           bra     7 <L2>
20                         3: R_M68HC12_RL_JUMP    \*ABS\*
21
22 0+5 <L1>:
23    5:   aa bb           oraa    5,SP\-
24
25 0+7 <L2>:
26 L1:
27         .dc.w   0xaabb
28 L2:
29         subd    L1,pc           ; Assemble to 5\-bit < 0 offset
30    7:   a3 dc           subd    \-4,PC \{5 <L1>\}
31
32 0+9 <L3>:
33    9:   a7              nop
34    a:   a7              nop
35    b:   a7              nop
36    c:   a7              nop
37    d:   a7              nop
38    e:   a7              nop
39    f:   a7              nop
40   10:   a7              nop
41   11:   a7              nop
42   12:   a7              nop
43   13:   a7              nop
44   14:   a7              nop
45   15:   a7              nop
46   16:   a7              nop
47 L3:
48         .ds.b   14, 0xA7
49         ldab    L3,pc           ; 5\-bit < 0 offset
50   17:   e6 d0           ldab    \-16,PC \{9 <L3>\}
51         ldab    L4,pc           ; 5\-bit > 0 offset
52   19:   e6 cf           ldab    15,PC \{2a <L4>\}
53         ...
54
55 0+2a <L4>:
56         ...
57         .skip   15
58 L4:
59         .skip   128
60         subd    L4,pc           ; 9\-bit < 0 offset
61   aa:   a3 f9 7d        subd    \-131,PC \{2a <L4>\}
62         addd    L5,pc           ; 9\-bit > 0 offset
63   ad:   e3 f8 80        addd    128,PC \{130 <L5>\}
64         ...
65
66 0+130 <L5>:
67         ...
68  22c:   00              bgnd
69         .skip   128
70 L5:
71         .skip   256\-3
72         orab    L5,pc           ; 9 bit < 0 offset \(min value\)
73  22d:   ea f9 00        orab    \-256,PC \{130 <L5>\}
74         oraa    L6,pc           ; 9 bit > 0 offset \(max value\)
75  230:   aa f8 ff        oraa    255,PC \{332 <L6>\}
76         ...
77
78 0+332 <L6>:
79         ...
80  42e:   00              bgnd
81  42f:   00              bgnd
82         .skip   255
83 L6:
84         .skip   256\-2
85         orab    L6,pc           ; 16 bit < 0 offset
86  430:   ea fa fe fe     orab    \-258,PC \{332 <L6>\}
87         anda    _main,pc        ; 16 bit < 0 offset
88  434:   a4 fa fb c8     anda    \-1080,PC \{0 <_main>\}
89         andb    L7,pc
90  438:   e4 fa 01 00     andb    256,PC \{53c <L7>\}
91         ...
92
93 0+53c <L7>:
94         .skip   256
95 L7:
96         stab    external,pc     ; External 16\-bit PCREL
97  53c:   6b fa fa c0     stab    \-1344,PC \{0 <_main>\}
98                         53e: R_M68HC12_PCREL_16 external
99         ldd     _table,pc
100  540:   ec cf           ldd     15,PC \{551 <_table>\}
101         addd    _table\+2,pc
102  542:   e3 cf           addd    15,PC \{553 <_table\+0x2>\}
103         subd    _table\+4,pc
104  544:   a3 cf           subd    15,PC \{555 <_table\+0x4>\}
105         addd    _table\+8,pc
106  546:   e3 f8 10        addd    16,PC \{559 <_table\+0x8>\}
107         addd    _table\+12,pc
108  549:   e3 f8 11        addd    17,PC \{55d <_table\+0xc>\}
109         addd    _table\+16,pc
110  54c:   e3 f8 12        addd    18,PC \{561 <_table\+0x10>\}
111         rts
112  54f:   3d              rts
113         nop
114  550:   a7              nop
115
116 0+551 <_table>:
117         ...
118 _table:
119         .ds.b   16,0
120         leax    _table,sp       ; 16\-bit absolute reloc
121  561:   1a f2 00 00     leax    0,SP
122                         563: R_M68HC12_16       _table
123         leay    _table,x
124  565:   19 e2 00 00     leay    0,X
125                         567: R_M68HC12_16       _table
126         leax    _table,y
127  569:   1a ea 00 00     leax    0,Y
128                         56b: R_M68HC12_16       _table