gas:
[binutils/dougsmingw.git] / ld / testsuite / ld-powerpc / tlstoc.s
blob5008d89f079ee24d5487d3fe7e142604f2c1ed48
1 .section ".tbss","awT",@nobits
2 .global _start,gd0,ld0,ld1,ld2,ie0,le0,le1
3 .align 3
4 gd0: .space 8
5 ld0: .space 8
6 ld1: .space 8
7 ld2: .space 8
8 ie0: .space 8
9 le0: .space 8
10 le1: .space 8
12 .section ".tdata","awT",@progbits
13 .align 3
14 gd4: .quad 0x123456789abcdef0
15 ld4: .quad 0x23456789abcdef01
16 ld5: .quad 0x3456789abcdef012
17 ld6: .quad 0x456789abcdef0123
18 ie4: .quad 0x56789abcdef01234
19 le4: .quad 0x6789abcdef012345
20 le5: .quad 0x789abcdef0123456
22 .text
23 _start:
24 #extern syms
25 #GD
26 addi 3,2,.Lgd@toc
27 bl .__tls_get_addr
28 nop
29 .section .toc,"aw",@progbits
30 .Lgd:
31 .quad gd@dtpmod
32 .quad gd@dtprel
33 .text
34 #LD
35 addi 3,2,.Lld@toc
36 bl .__tls_get_addr
37 nop
38 .section .toc,"aw",@progbits
39 .Lld:
40 .quad ld@dtpmod
41 .quad 0
42 .text
44 #global syms
45 #GD
46 addi 3,2,.Lgd0@toc
47 bl .__tls_get_addr
48 nop
49 .section .toc,"aw",@progbits
50 .Lgd0:
51 .quad gd0@dtpmod
52 .quad gd0@dtprel
53 .text
54 #LD
55 addi 3,2,.Lld0@toc
56 bl .__tls_get_addr
57 nop
58 .section .toc,"aw",@progbits
59 .Lld0:
60 .quad ld0@dtpmod
61 .quad 0
62 .text
64 addi 9,3,ld0@dtprel
66 addis 9,3,ld1@dtprel@ha
67 lwz 10,ld1@dtprel@l(9)
69 ld 9,.Lld2@toc(2)
70 ldx 10,9,3
71 .section .toc,"aw",@progbits
72 .Lld2:
73 .quad ld2@dtprel
74 .text
76 #IE
77 ld 9,.Lie0@toc(2)
78 lhzx 10,9,.Lie0@tls
79 .section .toc,"aw",@progbits
80 .Lie0:
81 .quad ie0@tprel
82 .text
84 #LE
85 lbz 10,le0@tprel(13) #R_PPC64_TPREL16 le0
87 addis 9,13,le1@tprel@ha #R_PPC64_TPREL16_HA le1
88 stb 10,le1@tprel@l(9) #R_PPC64_TPREL16_LO le1