X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fi386%2F__set_thread_area.s;h=c2c21dd5d6ccdbe6198f516199f8c9093d7988b0;hb=5e1019b01c968707accc85c99e63a18af665cf27;hp=a43525ece153bc2b40462f17ba981248d072b82f;hpb=c7d19f9923c66a2ddb47272f1e8fec8b804f54c4;p=musl diff --git a/src/thread/i386/__set_thread_area.s b/src/thread/i386/__set_thread_area.s index a43525ec..c2c21dd5 100644 --- a/src/thread/i386/__set_thread_area.s +++ b/src/thread/i386/__set_thread_area.s @@ -1,21 +1,46 @@ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: - pushl %ebx - movl 8(%esp),%ecx - movl $-1,4(%ecx) - movl %ecx,8(%ecx) - movl $0xfffff,12(%ecx) - movl $0x51,16(%ecx) - leal 4(%ecx),%ebx - movl $243,%eax + push %ebx + push $0x51 + push $0xfffff + push 16(%esp) + call 1f +1: addl $4f-1b,(%esp) + pop %ecx + mov (%ecx),%edx + push %edx + mov %esp,%ebx + xor %eax,%eax + mov $243,%al int $128 - popl %ebx testl %eax,%eax - jnz 1f - movl 4(%ecx),%ecx - leal 3(,%ecx,8),%ecx - movw %cx,%gs + jnz 2f + movl (%esp),%edx + movl %edx,(%ecx) + leal 3(,%edx,8),%edx +3: movw %dx,%gs 1: + addl $16,%esp + popl %ebx ret +2: + mov %ebx,%ecx + xor %ebx,%ebx + xor %edx,%edx + mov %ebx,(%esp) + mov $1,%bl + mov $16,%dl + mov $123,%al + int $128 + testl %eax,%eax + jnz 1b + mov $7,%dl + inc %al + jmp 3b + +.data + .align 4 +4: .long -1