i386: Also check R12-R15 registers when optimizing testq to testb
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / tlsnopic.s
CommitLineData
13ae64f3
JJ
1 .section ".tdata", "awT", @progbits
2 .globl baz
3 .hidden baz
4 .globl var
5 .hidden var2
6bar: .long 27
7baz: .long 29
8var: .long 31
9var2: .long 33
10 .text
11 .globl fn
12 .type fn,@function
13fn:
37e55690 14 /* Main binary, no PIC. */
13ae64f3
JJ
151: movl 1b, %edx
16 addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
17
37e55690 18 /* foo can be anywhere in startup TLS. */
13ae64f3
JJ
19 movl %gs:0, %eax
20 subl foo@GOTTPOFF(%edx), %eax
37e55690 21 /* %eax now contains &foo. */
13ae64f3 22
37e55690 23 /* bar only in the main program. */
13ae64f3
JJ
24 movl %gs:0, %eax
25 subl $bar@TPOFF, %eax
37e55690 26 /* %eax now contains &bar. */
13ae64f3 27
37e55690 28 /* baz only in the main program. */
13ae64f3 29 movl %gs:0, %ecx
37e55690 30 /* Arbitrary instructions in between. */
13ae64f3
JJ
31 nop
32 subl $baz@TPOFF, %ecx
37e55690 33 /* %ecx now contains &baz. */
13ae64f3 34
37e55690 35 /* var and var2 only in the main program. */
13ae64f3 36 movl %gs:0, %ecx
37e55690 37 /* Arbitrary instructions in between. */
13ae64f3
JJ
38 nop
39 nop
40 leal var@NTPOFF(%ecx), %eax
37e55690 41 /* Arbitrary instructions in between. */
13ae64f3
JJ
42 nop
43 leal var2@NTPOFF(%ecx), %edx
44
37e55690
JJ
45 /* foo can be anywhere in startup TLS. */
46 movl foo@INDNTPOFF, %eax
47 movl %gs:(%eax), %eax
48 /* %eax now contains foo. */
49
50 movl %gs:0, %eax
51 addl foo@INDNTPOFF, %eax
52 /* %eax now contains &foo. */
53
13ae64f3 54 ret
This page took 0.811908 seconds and 4 git commands to generate.