mailing list of musl libc
 help / color / mirror / code / Atom feed
50af913ce696796216e9d6551f92c7ac3a82dd97 blob 523 bytes (raw)

 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
26
27
28
29
 
// __clone(func, stack, flags, arg, ptid, tls, ctid)
//         x0,   x1,    w2,    x3,  x4,   x5,  x6

// syscall(SYS_clone, flags, stack, ptid, tls, ctid)
//         x8,        x0,    x1,    x2,   x3,  x4

.global __clone
.type   __clone,%function
__clone:
	// align stack and save func,arg
	and x1,x1,#-16
	stp x0,x3,[x1,#-16]!

	// syscall
	uxtw x0,w2
	mov x2,x4
	mov x3,x5
	mov x4,x6
	mov x8,#220 // SYS_clone
	svc #0

	cbz x0,1f
	// parent
	ret
	// child
1:	ldp x1,x0,[sp],#16
	blr x1
	mov x8,#93 // SYS_exit
	svc #0
debug log:

solving 50af913 ...
found 50af913 in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).