projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use inline syscalls for powerpc (32-bit)
[musl]
/
src
/
thread
/
x86_64
/
syscall_cp.s
diff --git
a/src/thread/x86_64/syscall_cp.s
b/src/thread/x86_64/syscall_cp.s
index
1894ce1
..
4f10171
100644
(file)
--- a/
src/thread/x86_64/syscall_cp.s
+++ b/
src/thread/x86_64/syscall_cp.s
@@
-1,13
+1,21
@@
.text
.text
+.global __cp_begin
+.hidden __cp_begin
+.global __cp_end
+.hidden __cp_end
+.global __cp_cancel
+.hidden __cp_cancel
+.hidden __cancel
.global __syscall_cp_asm
.global __syscall_cp_asm
-.type __syscall_cp_asm,%function
+.hidden __syscall_cp_asm
+.type __syscall_cp_asm,@function
__syscall_cp_asm:
__syscall_cp_asm:
- lea 1f(%rip),%rax
- mov %rax,8(%rdi)
- mov %rsp,(%rdi)
- mov 16(%rdi),%eax
+
+__cp_begin:
+ mov (%rdi),%eax
test %eax,%eax
test %eax,%eax
- jnz 2f
+ jnz __cp_cancel
+ mov %rdi,%r11
mov %rsi,%rax
mov %rdx,%rdi
mov %rcx,%rsi
mov %rsi,%rax
mov %rdx,%rdi
mov %rcx,%rsi
@@
-15,10
+23,9
@@
__syscall_cp_asm:
mov %r9,%r10
mov 8(%rsp),%r8
mov 16(%rsp),%r9
mov %r9,%r10
mov 8(%rsp),%r8
mov 16(%rsp),%r9
-1: syscall
+ mov %r11,8(%rsp)
+ syscall
+__cp_end:
ret
ret
-2: xor %edi,%edi
- mov %rdi,8(%r10)
- mov %rdi,(%r10)
- dec %rdi
- jmp pthread_exit
+__cp_cancel:
+ jmp __cancel