optimize i386 ___tls_get_addr asm
This commit is contained in:
parent
e75b16cf93
commit
880c479f0e
1 changed files with 8 additions and 1 deletions
|
|
@ -2,7 +2,14 @@
|
||||||
.global ___tls_get_addr
|
.global ___tls_get_addr
|
||||||
.type ___tls_get_addr,@function
|
.type ___tls_get_addr,@function
|
||||||
___tls_get_addr:
|
___tls_get_addr:
|
||||||
push %eax
|
mov %gs:4,%edx
|
||||||
|
mov (%eax),%ecx
|
||||||
|
cmp %ecx,(%edx)
|
||||||
|
jc 1f
|
||||||
|
mov 4(%eax),%eax
|
||||||
|
add (%edx,%ecx,4),%eax
|
||||||
|
ret
|
||||||
|
1: push %eax
|
||||||
call __tls_get_addr
|
call __tls_get_addr
|
||||||
pop %edx
|
pop %edx
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue