Automatic date update in version.in
[binutils-gdb.git] / ld / testsuite / ld-sparc / tlspie64.s
blobb8a89e1b02230e5f216e199b6f18bdaba3822092
1 .section .tbss,"awT",@nobits
2 .global tls_gd
3 .align 4
4 .type tls_gd, #object
5 .size tls_gd, 4
6 tls_gd:
7 .skip 4
8 .global tls_ld
9 .align 4
10 .type tls_ld, #object
11 .size tls_ld, 4
12 tls_ld:
13 .skip 4
14 .global tls_ie
15 .align 4
16 .type tls_ie, #object
17 .size tls_ie, 4
18 tls_ie:
19 .skip 4
20 .section ".text"
21 .LLGETPC0:
22 retl
23 add %o7, %l7, %l7
24 .align 4
25 .global foo
26 .type foo, #function
27 .proc 0104
28 foo:
29 save %sp, -160, %sp
30 sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
31 call .LLGETPC0
32 add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
33 nop;nop;nop;nop
35 /* GD -> IE with global variable not defined in executable */
36 sethi %tgd_hi22(sG1), %g1
37 add %g1, %tgd_lo10(sG1), %g1
38 add %l7, %g1, %o0, %tgd_add(sG1)
39 call __tls_get_addr, %tgd_call(sG1)
40 nop
41 nop;nop;nop;nop
43 /* GD -> LE with global variable defined in executable */
44 sethi %tgd_hi22(tls_gd), %g1
45 add %g1, %tgd_lo10(tls_gd), %g1
46 add %l7, %g1, %o0, %tgd_add(tls_gd)
47 call __tls_get_addr, %tgd_call(tls_gd)
48 nop
49 nop;nop;nop;nop
51 /* LD -> LE with global variable defined in executable */
52 sethi %tldm_hi22(tls_ld), %g1
53 add %g1, %tldm_lo10(tls_ld), %g1
54 add %l7, %g1, %o0, %tldm_add(tls_ld)
55 call __tls_get_addr, %tldm_call(tls_ld)
56 nop
57 sethi %tldo_hix22(tls_ld), %g1
58 xor %g1, %tldo_lox10(tls_ld), %g1
59 add %o0, %g1, %g1, %tldo_add(tls_ld)
60 nop;nop;nop;nop
62 /* IE -> LE with global variable defined in executable */
63 sethi %tie_hi22(tls_ie), %g1
64 add %g1, %tie_lo10(tls_ie), %g1
65 ldx [%l7 + %g1], %g1, %tie_ldx(tls_ie)
66 add %g7, %g1, %g1, %tie_add(tls_ie)
67 nop;nop;nop;nop
69 ret
70 restore