fix overly pessimistic realloc strategy in getdelim
[musl] / src / thread / i386 / __set_thread_area.s
1 .text
2 .global __set_thread_area
3 .type   __set_thread_area,@function
4 __set_thread_area:
5         push %ebx
6         push $0x51
7         push $0xfffff
8         push 16(%esp)
9         call 1f
10 1:      addl $4f-1b,(%esp)
11         pop %ecx
12         mov (%ecx),%edx
13         push %edx
14         mov %esp,%ebx
15         xor %eax,%eax
16         mov $243,%al
17         int $128
18         testl %eax,%eax
19         jnz 2f
20         movl (%esp),%edx
21         movl %edx,(%ecx)
22         leal 3(,%edx,8),%edx
23 3:      movw %dx,%gs
24 1:
25         addl $16,%esp
26         popl %ebx
27         ret
28 2:
29         mov %ebx,%ecx
30         xor %ebx,%ebx
31         xor %edx,%edx
32         mov %ebx,(%esp)
33         mov $1,%bl
34         mov $16,%dl
35         mov $123,%al
36         int $128
37         testl %eax,%eax
38         jnz 1b
39         mov $7,%dl
40         inc %al
41         jmp 3b
42
43 .data
44         .align 4
45 4:      .long -1