Commit | Line | Data |
---|---|---|
27bdea3d SC |
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>: | |
a696b49e | 10 | ;;; .* |
27bdea3d SC |
11 | ;;; |
12 | \.sect \.text | |
13 | \.globl _main | |
14 | _main: | |
15 | nop | |
16 | 0: a7 nop | |
5da0c277 | 17 | ldx L1,pc ; Assemble to 5\-bit > 0 offset |
6927f982 | 18 | 1: ee c2 ldx 0x2,PC \{0x5 <L1>\} |
27bdea3d | 19 | bra L2 |
6927f982 | 20 | 3: 20 02 bra 0x7 <L2> |
27bdea3d SC |
21 | 3: R_M68HC12_RL_JUMP \*ABS\* |
22 | ||
23 | 0+5 <L1>: | |
24 | 5: aa bb oraa 5,SP\- | |
25 | ||
26 | 0+7 <L2>: | |
27 | L1: | |
28 | .dc.w 0xaabb | |
29 | L2: | |
5da0c277 | 30 | subd L1,pc ; Assemble to 5\-bit < 0 offset |
6927f982 | 31 | 7: a3 dc subd 0xfffc,PC \{0x5 <L1>\} |
27bdea3d SC |
32 | |
33 | 0+9 <L3>: | |
34 | 9: a7 nop | |
35 | a: a7 nop | |
36 | b: a7 nop | |
37 | c: a7 nop | |
38 | d: a7 nop | |
39 | e: a7 nop | |
40 | f: a7 nop | |
41 | 10: a7 nop | |
42 | 11: a7 nop | |
43 | 12: a7 nop | |
44 | 13: a7 nop | |
45 | 14: a7 nop | |
46 | 15: a7 nop | |
47 | 16: a7 nop | |
48 | L3: | |
49 | .ds.b 14, 0xA7 | |
5da0c277 | 50 | ldab L3,pc ; 5\-bit < 0 offset |
6927f982 | 51 | 17: e6 d0 ldab 0xfff0,PC \{0x9 <L3>\} |
5da0c277 | 52 | ldab L4,pc ; 5\-bit > 0 offset |
6927f982 | 53 | 19: e6 cf ldab 0xf,PC \{0x2a <L4>\} |
27bdea3d SC |
54 | ... |
55 | ||
5da0c277 | 56 | 0+2a <L4>: |
27bdea3d | 57 | ... |
5da0c277 | 58 | .skip 15 |
27bdea3d SC |
59 | L4: |
60 | .skip 128 | |
5da0c277 | 61 | subd L4,pc ; 9\-bit < 0 offset |
6927f982 | 62 | aa: a3 f9 7d subd 0xff7d,PC \{0x2a <L4>\} |
5da0c277 | 63 | addd L5,pc ; 9\-bit > 0 offset |
6927f982 | 64 | ad: e3 f8 80 addd 0x80,PC \{0x130 <L5>\} |
27bdea3d SC |
65 | ... |
66 | ||
5da0c277 | 67 | 0+130 <L5>: |
27bdea3d | 68 | ... |
5da0c277 | 69 | 22c: 00 bgnd |
27bdea3d SC |
70 | .skip 128 |
71 | L5: | |
5da0c277 SC |
72 | .skip 256\-3 |
73 | orab L5,pc ; 9 bit < 0 offset \(min value\) | |
6927f982 | 74 | 22d: ea f9 00 orab 0xff00,PC \{0x130 <L5>\} |
5da0c277 | 75 | oraa L6,pc ; 9 bit > 0 offset \(max value\) |
6927f982 | 76 | 230: aa f8 ff oraa 0xff,PC \{0x332 <L6>\} |
27bdea3d SC |
77 | ... |
78 | ||
5da0c277 SC |
79 | 0+332 <L6>: |
80 | ... | |
81 | 42e: 00 bgnd | |
82 | 42f: 00 bgnd | |
27bdea3d SC |
83 | .skip 255 |
84 | L6: | |
5da0c277 SC |
85 | .skip 256\-2 |
86 | orab L6,pc ; 16 bit < 0 offset | |
6927f982 | 87 | 430: ea fa fe fe orab 0xfefe,PC \{0x332 <L6>\} |
27bdea3d | 88 | anda _main,pc ; 16 bit < 0 offset |
6927f982 | 89 | 434: a4 fa fb c8 anda 0xfbc8,PC \{0x0 <_main>\} |
27bdea3d | 90 | andb L7,pc |
6927f982 | 91 | 438: e4 fa 01 00 andb 0x100,PC \{0x53c <L7>\} |
27bdea3d SC |
92 | ... |
93 | ||
5da0c277 | 94 | 0+53c <L7>: |
27bdea3d SC |
95 | .skip 256 |
96 | L7: | |
97 | stab external,pc ; External 16\-bit PCREL | |
6927f982 | 98 | 53c: 6b fa fa c0 stab 0xfac0,PC \{0x0 <_main>\} |
5da0c277 | 99 | 53e: R_M68HC12_PCREL_16 external |
27bdea3d | 100 | ldd _table,pc |
6927f982 | 101 | 540: ec cf ldd 0xf,PC \{0x551 <_table>\} |
27bdea3d | 102 | addd _table\+2,pc |
6927f982 | 103 | 542: e3 cf addd 0xf,PC \{0x553 <_table\+0x2>\} |
27bdea3d | 104 | subd _table\+4,pc |
6927f982 | 105 | 544: a3 cf subd 0xf,PC \{0x555 <_table\+0x4>\} |
27bdea3d | 106 | addd _table\+8,pc |
6927f982 | 107 | 546: e3 f8 10 addd 0x10,PC \{0x559 <_table\+0x8>\} |
27bdea3d | 108 | addd _table\+12,pc |
6927f982 | 109 | 549: e3 f8 11 addd 0x11,PC \{0x55d <_table\+0xc>\} |
27bdea3d | 110 | addd _table\+16,pc |
6927f982 | 111 | 54c: e3 f8 12 addd 0x12,PC \{0x561 <_table\+0x10>\} |
27bdea3d | 112 | rts |
5da0c277 | 113 | 54f: 3d rts |
27bdea3d | 114 | nop |
5da0c277 | 115 | 550: a7 nop |
27bdea3d | 116 | |
5da0c277 SC |
117 | 0+551 <_table>: |
118 | ... | |
abdf8f87 SC |
119 | _table: |
120 | .ds.b 16,0 | |
121 | leax _table,sp ; 16\-bit absolute reloc | |
6927f982 | 122 | 561: 1a f2 00 00 leax 0x0,SP |
abdf8f87 SC |
123 | 563: R_M68HC12_16 _table |
124 | leay _table,x | |
6927f982 | 125 | 565: 19 e2 00 00 leay 0x0,X |
abdf8f87 SC |
126 | 567: R_M68HC12_16 _table |
127 | leax _table,y | |
6927f982 | 128 | 569: 1a ea 00 00 leax 0x0,Y |
abdf8f87 | 129 | 56b: R_M68HC12_16 _table |