]>
Commit | Line | Data |
---|---|---|
c213164a AM |
1 | .section ".tbss","awT",@nobits |
2 | .p2align 3 | |
3 | pad: .space 8 | |
4 | .global a | |
5 | a: .space 8 | |
6 | .global b | |
7 | b: .space 8 | |
8 | .global c | |
9 | c: .space 8 | |
10 | .global d | |
11 | d: .space 8 | |
12 | ||
13 | .text | |
14 | .globl _start | |
15 | _start: | |
16 | #Small model OpenPower | |
17 | ld 9,.La@toc(2) | |
18 | add 10,9,.La@tls | |
19 | .section .toc,"aw",@progbits | |
20 | .La: | |
21 | .quad a@tprel | |
22 | .text | |
23 | ||
24 | #Medium model ELF | |
1b611b2d | 25 | addis 9,2,b@got@tprel@ha |
c213164a AM |
26 | ld 10,b@got@tprel@l(9) |
27 | add 3,10,b@tls | |
28 | ||
29 | #PCrel | |
30 | pld 4,c@got@tprel@pcrel | |
31 | add 4,4,c@tls@pcrel | |
32 | ||
33 | #All of the above using the same symbol | |
34 | addis 9,2,.Ld@toc@ha | |
35 | ld 9,.Ld@toc@l(9) | |
36 | add 10,9,.Ld@tls | |
37 | .section .toc,"aw",@progbits | |
38 | .Ld: | |
39 | .quad d@tprel | |
40 | .text | |
1b611b2d | 41 | addis 9,2,d@got@tprel@ha |
c213164a AM |
42 | ld 31,d@got@tprel@l(9) |
43 | add 3,31,d@tls | |
44 | pld 30,d@got@tprel@pcrel | |
45 | add 3,30,d@tls@pcrel | |
46 | #Note that after optimisation r31 and r30 above have a different value to | |
47 | #what they would have without optimisation. r31 may not even be written. | |
48 | #Here are all the other insns that gas/ld accept as the final insn of an | |
49 | #IE sequence. The r30 value below will be different after optimisation | |
50 | #for the non-update forms. | |
51 | lwzx 4,30,d@tls@pcrel | |
52 | lwzux 4,30,d@tls@pcrel | |
53 | lbzx 5,30,d@tls@pcrel | |
54 | lbzux 5,30,d@tls@pcrel | |
55 | stwx 6,30,d@tls@pcrel | |
56 | stwux 6,30,d@tls@pcrel | |
57 | stbx 7,30,d@tls@pcrel | |
58 | stbux 7,30,d@tls@pcrel | |
59 | lhzx 8,30,d@tls@pcrel | |
60 | lhzux 8,30,d@tls@pcrel | |
61 | lhax 9,30,d@tls@pcrel | |
62 | lhaux 9,30,d@tls@pcrel | |
63 | sthx 10,30,d@tls@pcrel | |
64 | sthux 10,30,d@tls@pcrel | |
65 | lfsx 11,30,d@tls@pcrel | |
66 | lfsux 11,30,d@tls@pcrel | |
67 | lfdx 12,30,d@tls@pcrel | |
68 | lfdux 12,30,d@tls@pcrel | |
69 | stfsx 13,30,d@tls@pcrel | |
70 | stfsux 13,30,d@tls@pcrel | |
71 | stfdx 14,30,d@tls@pcrel | |
72 | stfdux 14,30,d@tls@pcrel | |
73 | ldx 15,30,d@tls@pcrel | |
74 | ldux 15,30,d@tls@pcrel | |
75 | stdx 16,30,d@tls@pcrel | |
76 | stdux 16,30,d@tls@pcrel | |
77 | lwax 17,30,d@tls@pcrel |