Automatic date update in version.in
[binutils-gdb.git] / ld / testsuite / ld-powerpc / tocopt.s
blobcb5cc3e459f74b12a5f3c3cde88a98ea64189e08
1 .section .toc,"aw"
2 x4t:
3 .quad x4
4 x5t:
5 .quad x5
6 x6t:
7 .quad x6
9 .section .sdata,"aw"
10 x1:
11 .byte 1
12 x2:
13 .byte 2
14 x3:
15 .byte 3
16 x4:
17 .byte 4
18 x5:
19 .byte 5
20 x6:
21 .byte 6
23 .globl _start
24 .text
25 _start:
26 # no need for got entry, optimise to nop,addi
27 # note that due to unexpected toc/got insns the full optimisation is
28 # not done. see tocopt5 for test without unexpected insns.
29 addis 9,2,x1@got@ha
30 ld 9,x1@got@l(9)
31 # must keep got entry, optimise to nop,addi,ld
32 addis 4,2,x2@got@ha
33 addi 5,4,x2@got@l
34 ld 6,0(5)
35 # must keep got entry, optimise to nop,li,ldx
36 lis 29,x3@got@ha
37 addi 29,29,x3@got@l
38 ldx 3,2,29
40 # no need for toc entry, optimise to nop,addi
41 addis 9,2,x4t@toc@ha
42 ld 9,x4t@toc@l(9)
43 # must keep toc entry, optimise to nop,addi,ld
44 # if we had a reloc tying the ld to x5/x5t then we could throw away
45 # the toc entry and optimise to nop,nop,addi
46 addis 4,2,x5t@toc@ha
47 addi 5,4,x5t@toc@l
48 ld 6,0(5)
49 # must keep toc entry, optimise to nop,li,ldx
50 lis 29,x6t@toc@ha
51 addi 29,29,x6t@toc@l
52 ldx 3,2,29