File: bug-1825.d

package info (click to toggle)
binutils 2.32.51.20190821-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 309,676 kB
  • sloc: ansic: 1,201,497; asm: 658,869; cpp: 130,432; exp: 69,370; makefile: 56,804; sh: 23,583; lisp: 14,519; yacc: 14,467; perl: 2,111; ada: 1,681; lex: 1,649; pascal: 1,446; python: 991; cs: 879; sed: 195; xml: 95; awk: 25
file content (129 lines) | stat: -rw-r--r-- 2,833 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#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 <L1>\}
	bra	L2
   3:	20 02       	bra	0x7 <L2>
			3: R_M68HC12_RL_JUMP	\*ABS\*

0+5 <L1>:
   5:	aa bb       	oraa	5,SP\-

0+7 <L2>:
L1:
	.dc.w	0xaabb
L2:
	subd	L1,pc		; Assemble to 5\-bit < 0 offset
   7:	a3 dc       	subd	0xfffc,PC \{0x5 <L1>\}

0+9 <L3>:
   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 <L3>\}
	ldab	L4,pc		; 5\-bit > 0 offset
  19:	e6 cf       	ldab	0xf,PC \{0x2a <L4>\}
	...

0+2a <L4>:
	...
	.skip	15
L4:
	.skip	128
	subd	L4,pc		; 9\-bit < 0 offset
  aa:	a3 f9 7d    	subd	0xff7d,PC \{0x2a <L4>\}
	addd	L5,pc		; 9\-bit > 0 offset
  ad:	e3 f8 80    	addd	0x80,PC \{0x130 <L5>\}
	...

0+130 <L5>:
	...
 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 <L5>\}
	oraa	L6,pc		; 9 bit > 0 offset \(max value\)
 230:	aa f8 ff    	oraa	0xff,PC \{0x332 <L6>\}
	...

0+332 <L6>:
	...
 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 <L6>\}
	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 <L7>\}
	...

0+53c <L7>:
	.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