Commit | Line | Data |
---|---|---|
b3dfd7fe JJ |
1 | /* Force .data aligned to 4K, so .got very likely gets at 0x13190 |
2 | (0x60 bytes .tdata and 0x130 bytes .dynamic) */ | |
3 | .data | |
4 | .balign 4096 | |
5 | .section ".tdata", "awT", @progbits | |
6 | .globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8 | |
7 | .globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8 | |
8 | .hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8 | |
9 | sg1: .long 17 | |
10 | sg2: .long 18 | |
11 | sg3: .long 19 | |
12 | sg4: .long 20 | |
13 | sg5: .long 21 | |
14 | sg6: .long 22 | |
15 | sg7: .long 23 | |
16 | sg8: .long 24 | |
17 | sl1: .long 65 | |
18 | sl2: .long 66 | |
19 | sl3: .long 67 | |
20 | sl4: .long 68 | |
21 | sl5: .long 69 | |
22 | sl6: .long 70 | |
23 | sl7: .long 71 | |
24 | sl8: .long 72 | |
25 | sh1: .long 257 | |
26 | sh2: .long 258 | |
27 | sh3: .long 259 | |
28 | sh4: .long 260 | |
29 | sh5: .long 261 | |
30 | sh6: .long 262 | |
31 | sh7: .long 263 | |
32 | sh8: .long 264 | |
33 | /* Force .text aligned to 4K, so it very likely gets at 0x1000. */ | |
34 | .pred.safe_across_calls p1-p5,p16-p63 | |
35 | .text | |
36 | .balign 4096 | |
37 | .globl fn1# | |
38 | .proc fn1# | |
39 | fn1: | |
40 | .prologue 12, 33 | |
41 | .mib | |
42 | .save ar.pfs, r34 | |
43 | alloc r34 = ar.pfs, 0, 3, 2, 0 | |
44 | .save rp, r33 | |
45 | mov r33 = b0 | |
46 | ||
47 | /* GD */ | |
48 | addl r14 = @ltoff(@dtpmod(sg1#)), gp | |
49 | addl r15 = @ltoff(@dtprel(sg1#)), gp | |
50 | ;; | |
51 | ld8 out0 = [r14] | |
52 | ld8 out1 = [r15] | |
53 | br.call.sptk.many b0 = __tls_get_addr# | |
54 | ;; | |
55 | ||
56 | /* GD against hidden symbol */ | |
57 | addl r14 = @ltoff(@dtpmod(sh2#)), gp | |
58 | addl r15 = @ltoff(@dtprel(sh2#)), gp | |
59 | ;; | |
60 | ld8 out0 = [r14] | |
61 | ld8 out1 = [r15] | |
62 | br.call.sptk.many b0 = __tls_get_addr# | |
63 | ;; | |
64 | ||
65 | /* LD */ | |
66 | addl r14 = @ltoff(@dtpmod(sl1#)), gp | |
67 | addl out1 = @dtprel(sl1#) + 1, r0 | |
68 | ;; | |
69 | ld8 out0 = [r14] | |
70 | br.call.sptk.many b0 = __tls_get_addr# | |
71 | ;; | |
72 | ||
73 | /* LD with 4 variables variables */ | |
74 | addl r14 = @ltoff(@dtpmod(sh1#)), gp | |
75 | mov out1 = r0 | |
76 | ;; | |
77 | ld8 out0 = [r14] | |
78 | br.call.sptk.many b0 = __tls_get_addr# | |
79 | ;; | |
80 | mov r2 = r8 | |
81 | ;; | |
82 | addl r14 = @dtprel(sh1#), r2 | |
83 | addl r15 = @dtprel(sH1#) + 2, r2 | |
84 | ;; | |
85 | adds r14 = @dtprel(sh5#) + 3, r8 | |
86 | movl r15 = @dtprel(sH5#) + 1 | |
87 | ;; | |
88 | add r15 = r15, r8 | |
89 | ;; | |
90 | ||
a823975a JJ |
91 | /* IE against global */ |
92 | addl r14 = @ltoff(@tprel(sg2#)), gp | |
93 | ;; | |
94 | ld8 r15 = [r14] | |
95 | ;; | |
96 | add r14 = r15, r13 | |
97 | ;; | |
98 | ||
99 | /* IE against local and hidden */ | |
100 | addl r14 = @ltoff(@tprel(sl2#)), gp | |
101 | addl r15 = @ltoff(@tprel(sh2#)), gp | |
102 | ;; | |
103 | ld8 r14 = [r14] | |
104 | ld8 r15 = [r15] | |
105 | ;; | |
106 | add r14 = r14, r13 | |
107 | add r15 = r15, r13 | |
108 | ;; | |
109 | ||
b3dfd7fe JJ |
110 | mov ar.pfs = r34 |
111 | mov b0 = r33 | |
112 | br.ret.sptk.many b0 | |
113 | .endp fn1# |