#objdump: -S -r #as: -m68hc12 -gdwarf2 #name: 68HC12 PC-relative addressing modes (bug-1825) .*: file format elf32\-m68hc12 Disassembly of section \.text: 0+ <_main>: ;;; .* ;;; \.sect \.text \.globl _main _main: nop 0: a7 nop ldx L1,pc ; Assemble to 5\-bit > 0 offset 1: ee c2 ldx 0x2,PC \{0x5 \} bra L2 3: 20 02 bra 0x7 3: R_M68HC12_RL_JUMP \*ABS\* 0+5 : 5: aa bb oraa 5,SP\- 0+7 : L1: .dc.w 0xaabb L2: subd L1,pc ; Assemble to 5\-bit < 0 offset 7: a3 dc subd 0xfffc,PC \{0x5 \} 0+9 : 9: a7 nop a: a7 nop b: a7 nop c: a7 nop d: a7 nop e: a7 nop f: a7 nop 10: a7 nop 11: a7 nop 12: a7 nop 13: a7 nop 14: a7 nop 15: a7 nop 16: a7 nop L3: .ds.b 14, 0xA7 ldab L3,pc ; 5\-bit < 0 offset 17: e6 d0 ldab 0xfff0,PC \{0x9 \} ldab L4,pc ; 5\-bit > 0 offset 19: e6 cf ldab 0xf,PC \{0x2a \} ... 0+2a : ... .skip 15 L4: .skip 128 subd L4,pc ; 9\-bit < 0 offset aa: a3 f9 7d subd 0xff7d,PC \{0x2a \} addd L5,pc ; 9\-bit > 0 offset ad: e3 f8 80 addd 0x80,PC \{0x130 \} ... 0+130 : ... 22c: 00 bgnd .skip 128 L5: .skip 256\-3 orab L5,pc ; 9 bit < 0 offset \(min value\) 22d: ea f9 00 orab 0xff00,PC \{0x130 \} oraa L6,pc ; 9 bit > 0 offset \(max value\) 230: aa f8 ff oraa 0xff,PC \{0x332 \} ... 0+332 : ... 42e: 00 bgnd 42f: 00 bgnd .skip 255 L6: .skip 256\-2 orab L6,pc ; 16 bit < 0 offset 430: ea fa fe fe orab 0xfefe,PC \{0x332 \} anda _main,pc ; 16 bit < 0 offset 434: a4 fa fb c8 anda 0xfbc8,PC \{0x0 <_main>\} andb L7,pc 438: e4 fa 01 00 andb 0x100,PC \{0x53c \} ... 0+53c : .skip 256 L7: stab external,pc ; External 16\-bit PCREL 53c: 6b fa fa c0 stab 0xfac0,PC \{0x0 <_main>\} 53e: R_M68HC12_PCREL_16 external ldd _table,pc 540: ec cf ldd 0xf,PC \{0x551 <_table>\} addd _table\+2,pc 542: e3 cf addd 0xf,PC \{0x553 <_table\+0x2>\} subd _table\+4,pc 544: a3 cf subd 0xf,PC \{0x555 <_table\+0x4>\} addd _table\+8,pc 546: e3 f8 10 addd 0x10,PC \{0x559 <_table\+0x8>\} addd _table\+12,pc 549: e3 f8 11 addd 0x11,PC \{0x55d <_table\+0xc>\} addd _table\+16,pc 54c: e3 f8 12 addd 0x12,PC \{0x561 <_table\+0x10>\} rts 54f: 3d rts nop 550: a7 nop 0+551 <_table>: ... _table: .ds.b 16,0 leax _table,sp ; 16\-bit absolute reloc 561: 1a f2 00 00 leax 0x0,SP 563: R_M68HC12_16 _table leay _table,x 565: 19 e2 00 00 leay 0x0,X 567: R_M68HC12_16 _table leax _table,y 569: 1a ea 00 00 leax 0x0,Y 56b: R_M68HC12_16 _table