x86: make sure all PUSH/POP honor DefaultSize
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / tlsd.s
CommitLineData
13ae64f3
JJ
1 .section ".tdata", "awT", @progbits
2 .globl foo, baz
3 .hidden baz
4foo: .long 25
5bar: .long 27
6baz: .long 29
7 .text
8 .globl fn
9 .type fn,@function
10fn:
11 pushl %ebp
12 movl %esp, %ebp
13 pushl %ebx
14 pushl %eax
15 call 1f
161: popl %ebx
17 addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
18
19 /* Dynamic TLS model, foo not known to be in the current object */
20 leal foo@TLSGD(,%ebx,1), %eax
21 call ___tls_get_addr@PLT
22 /* %eax now contains &foo */
23
24 /* Dynamic TLS model, bar and baz known to be in the current object */
25 leal bar@TLSLDM(%ebx), %eax
26 call ___tls_get_addr@PLT
27
28 /* Just show that there can be arbitrary instructions here */
34d9ee9e 29 addl $0, %edi
13ae64f3
JJ
30
31 leal bar@DTPOFF(%eax), %edx
32 /* %edx now contains &bar */
33
34 /* Again, arbitrary instructions */
34d9ee9e 35 addl $0, %esi
13ae64f3
JJ
36
37 leal baz@DTPOFF(%eax), %ecx
38 /* %ecx now contains &baz */
39
40 movl -4(%ebp), %ebx
41 leave
42 ret
This page took 0.776278 seconds and 4 git commands to generate.