mailing list of musl libc
 help / color / mirror / code / Atom feed
0ec837608162af364c9372ecdc8823b96f6c9f6f blob 998 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
/*
 * __clone(func, stack, flags, arg, ptid, tls, ctid)
 *         r0,   r1,    r2,    r3,  r4,   r5,  r6
 *
 * sys_clone(flags, stack, ptid, ctid, tls)
 *           r0,    r1,    r2,   r3,   r4
 */
.global __clone
.hidden __clone
.type __clone,%function
__clone:
	/* align stack */
	andd $r1 = $r1, -32
	;;
	/* Set clone_flags */
	copyd $r0 = $r2
	addd $r1 = $r1, -32
	/* Save fn ($r0) on child stack */
	sd -32[$r1] = $r0
	;;
	/* Save args ($r3) on child stack */
	sd 8[$r1] = $r3
	/* Set parent_tidptr */
	copyd $r2 = $r4
	/* Set child_tidptr */
	copyd $r3 = $r6
	/* Set tls */
	copyd $r4 = $r5
	;;
	scall 220 /* __NR_clone */
	;;
	/* If 0, then we are the child */
	cb.deqz $r0, 1f
	;;
	/* Else we are the parent */
	ret
	;;

	/* Let's get the child running the correct function */
1:
	/* get fn from stack */
	ld $r1 = 0[$sp]
	;;
	/* Get args from stack */
	ld $r0 = 8[$sp]
	addd $sp = $sp, 32
	;;
	icall $r1
	;;
	scall 93 /* __NR_exit */
	;;
	/* We should never ever get here ! */
	errop
	;;
debug log:

solving 0ec83760 ...
found 0ec83760 in https://inbox.vuxu.org/musl/20220711152322.23418-1-jborne@kalray.eu/

applying [1/1] https://inbox.vuxu.org/musl/20220711152322.23418-1-jborne@kalray.eu/
diff --git a/src/thread/kvx/clone.s b/src/thread/kvx/clone.s
new file mode 100644
index 00000000..0ec83760

Checking patch src/thread/kvx/clone.s...
Applied patch src/thread/kvx/clone.s cleanly.

index at:
100644 0ec837608162af364c9372ecdc8823b96f6c9f6f	src/thread/kvx/clone.s

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).