* m68hc11-dis.c (print_indexed_operand): Fix PC-relative address
[deliverable/binutils-gdb.git] / gas / testsuite / gas / m68hc11 / bug-1825.s
CommitLineData
27bdea3d
SC
1;;; Bug #1825: gas assemble PC-relative indexed addressing modes incorrectly
2;;; http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1825&group_id=2424
3;;;
4 .sect .text
5 .globl _main
6_main:
7 nop
8 ldx L1,pc ; Assemble to 5-bit > 0 offset
9 bra L2
10L1:
11 .dc.w 0xaabb
12L2:
13 subd L1,pc ; Assemble to 5-bit < 0 offset
14L3:
15 .ds.b 14, 0xA7
16 ldab L3,pc ; 5-bit < 0 offset
17 ldab L4,pc ; 5-bit > 0 offset
18 .skip 31
19L4:
20 .skip 128
21 subd L4,pc ; 9-bit < 0 offset
22 addd L5,pc ; 9-bit > 0 offset
23 .skip 128
24L5:
25 .skip 256-2
26 orab L5,pc ; 9 bit < 0 offset (min value)
27 oraa L6,pc ; 9 bit > 0 offset (max value)
28 .skip 255
29L6:
30 anda _main,pc ; 16 bit < 0 offset
31 andb L7,pc
32 .skip 256
33L7:
34 stab external,pc ; External 16-bit PCREL
35 ldd _table,pc
36 addd _table+2,pc
37 subd _table+4,pc
38 addd _table+8,pc
39 addd _table+12,pc
40 addd _table+16,pc
41 rts
42 nop
43_table:
44 .ds.b 16,0
This page took 0.024265 seconds and 4 git commands to generate.