xref: /aosp_15_r20/external/musl/src/thread/aarch64/syscall_cp.s (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1// __syscall_cp_asm(&self->cancel, nr, u, v, w, x, y, z)
2//                  x0             x1  x2 x3 x4 x5 x6 x7
3
4// syscall(nr, u, v, w, x, y, z)
5//         x8  x0 x1 x2 x3 x4 x5
6
7.global __cp_begin
8.hidden __cp_begin
9.global __cp_end
10.hidden __cp_end
11.global __cp_cancel
12.hidden __cp_cancel
13.hidden __cancel
14.global __syscall_cp_asm
15.hidden __syscall_cp_asm
16.type __syscall_cp_asm,%function
17__syscall_cp_asm:
18__cp_begin:
19	ldr w0,[x0]
20	cbnz w0,__cp_cancel
21	mov x8,x1
22	mov x0,x2
23	mov x1,x3
24	mov x2,x4
25	mov x3,x5
26	mov x4,x6
27	mov x5,x7
28	svc 0
29__cp_end:
30	ret
31__cp_cancel:
32	b __cancel
33