X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fx86_64%2Fsyscall_cp.s;h=4f101716d4ee0cd50461f45a0da6b2edb2be3d4c;hb=e95538fa07d2b460b25ee6c2fef05f820888776d;hp=2081928887ab348730b82fa8be3a304754187366;hpb=1e4f1cf154d18d2bd13cd4524a8bbae6786efd02;p=musl diff --git a/src/thread/x86_64/syscall_cp.s b/src/thread/x86_64/syscall_cp.s index 20819288..4f101716 100644 --- a/src/thread/x86_64/syscall_cp.s +++ b/src/thread/x86_64/syscall_cp.s @@ -1,12 +1,20 @@ .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 +.hidden __syscall_cp_asm +.type __syscall_cp_asm,@function __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 - jnz 2f + jnz __cp_cancel mov %rdi,%r11 mov %rsi,%rax mov %rdx,%rdi @@ -16,9 +24,8 @@ __syscall_cp_asm: mov 8(%rsp),%r8 mov 16(%rsp),%r9 mov %r11,8(%rsp) -1: syscall - xor %ecx,%ecx - mov 8(%rsp),%rdi - mov %rcx,(%rdi) + syscall +__cp_end: ret -2: call __cancel +__cp_cancel: + jmp __cancel