github.com/afumu/libc@v0.0.6/musl/src/thread/i386/__set_thread_area.s (about)

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