summaryrefslogtreecommitdiff
path: root/src/thread/x86_64/syscall_cp.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/x86_64/syscall_cp.s')
-rw-r--r--src/thread/x86_64/syscall_cp.s11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/thread/x86_64/syscall_cp.s b/src/thread/x86_64/syscall_cp.s
index a36e8d1d..8b250488 100644
--- a/src/thread/x86_64/syscall_cp.s
+++ b/src/thread/x86_64/syscall_cp.s
@@ -8,6 +8,7 @@ __syscall_cp_asm:
mov 16(%rdi),%eax
test %eax,%eax
jnz 2f
+ mov %rdi,%r11
mov %rsi,%rax
mov %rdx,%rdi
mov %rcx,%rsi
@@ -15,10 +16,10 @@ __syscall_cp_asm:
mov %r9,%r10
mov 8(%rsp),%r8
mov 16(%rsp),%r9
+ mov %r11,8(%rsp)
1: syscall
+ xor %ecx,%ecx
+ mov 8(%rsp),%edi
+ mov %rcx,(%rdi)
ret
-2: xor %edi,%edi
- mov %rdi,8(%r10)
- mov %rdi,(%r10)
- dec %rdi
- jmp __cancel
+2: call __cancel