about summary refs log tree commit diff
path: root/src/thread/x86_64/syscall_cp.s
blob: 8b250488139bf6b294401167e82cedda39077977 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.text
.global __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
	test %eax,%eax
	jnz 2f
	mov %rdi,%r11
	mov %rsi,%rax
	mov %rdx,%rdi
	mov %rcx,%rsi
	mov %r8,%rdx
	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:	call __cancel