fixed bash/dash/sh issue (Ubuntu)
[zpugcc/jano.git] / toolchain / binutils / ld / testsuite / ld-ia64 / tlsbinpic.s
blob88a054355edd526dbfdc3fb73f9f68c2f92724be
1 /* Force .data aligned to 4K, so that .got very likely gets at
2 0x60000000000031b0 (0x60 bytes .tdata and 0x150 bytes
3 .dynamic). */
4 .data
5 .balign 4096
6 .section ".tdata", "awT", @progbits
7 .globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8
8 .globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
9 .hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
10 sg1: .long 17
11 sg2: .long 18
12 sg3: .long 19
13 sg4: .long 20
14 sg5: .long 21
15 sg6: .long 22
16 sg7: .long 23
17 sg8: .long 24
18 sl1: .long 65
19 sl2: .long 66
20 sl3: .long 67
21 sl4: .long 68
22 sl5: .long 69
23 sl6: .long 70
24 sl7: .long 71
25 sl8: .long 72
26 sh1: .long 257
27 sh2: .long 258
28 sh3: .long 259
29 sh4: .long 260
30 sh5: .long 261
31 sh6: .long 262
32 sh7: .long 263
33 sh8: .long 264
34 /* Force .text aligned to 4K, so it very likely gets at
35 0x4000000000001000. */
36 .pred.safe_across_calls p1-p5,p16-p63
37 .text
38 .balign 4096
39 .globl fn2#
40 .proc fn2#
41 fn2:
42 .prologue 12, 33
43 .mib
44 .save ar.pfs, r34
45 alloc r34 = ar.pfs, 0, 3, 2, 0
46 .save rp, r33
47 mov r33 = b0
49 /* GD */
50 addl r14 = @ltoff(@dtpmod(sG1#)), gp
51 addl r15 = @ltoff(@dtprel(sG1#)), gp
53 ld8 out0 = [r14]
54 ld8 out1 = [r15]
55 br.call.sptk.many b0 = __tls_get_addr#
58 /* GD against local symbol */
59 addl r14 = @ltoff(@dtpmod(sl2#)), gp
60 addl r15 = @ltoff(@dtprel(sl2#)), gp
62 ld8 out0 = [r14]
63 ld8 out1 = [r15]
64 br.call.sptk.many b0 = __tls_get_addr#
67 /* LD */
68 addl r14 = @ltoff(@dtpmod(sl1#)), gp
69 addl out1 = @dtprel(sl1#) + 1, r0
71 ld8 out0 = [r14]
72 br.call.sptk.many b0 = __tls_get_addr#
75 /* LD with 4 variables variables */
76 addl r14 = @ltoff(@dtpmod(sh1#)), gp
77 mov out1 = r0
79 ld8 out0 = [r14]
80 br.call.sptk.many b0 = __tls_get_addr#
82 mov r2 = r8
84 addl r14 = @dtprel(sh1#), r2
85 addl r15 = @dtprel(sh2#) + 2, r2
87 adds r14 = @dtprel(sh3#) + 3, r8
88 movl r15 = @dtprel(sh4#) + 1
90 add r15 = r15, r8
93 mov ar.pfs = r34
94 mov b0 = r33
95 br.ret.sptk.many b0
96 .endp fn2#