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