mailing list of musl libc
 help / color / mirror / code / Atom feed
baab9a51ee3b688a258d51c60e63f5d8b448f932 blob 940 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
 
#__clone(func, stack, flags, arg, ptid, tls, ctid)
#         a0,    a1,   a2,    a3,  a4,  a5,   a6
# sys_clone(flags, stack, ptid, ctid, tls)
#            a0,    a1,   a2,    a3,  a4

.global	__clone
.hidden __clone
.type __clone,@function
__clone:
	# Save function pointer and argument pointer on new thread stack
	addi.d  $a1, $a1, -16
	st.d    $a0, $a1, 0     # save function pointer
	st.d    $a3, $a1, 8     # save argument pointer
	or      $a0, $a2, $zero
	or      $a2, $a4, $zero
	or      $a3, $a6, $zero
	or      $a4, $a5, $zero
	ori     $a7, $zero, 220
	syscall 0               # call clone

	beqz    $a0, 1f         # whether child process
	jirl    $zero, $ra, 0   # parent process return
1:
	ld.d    $t8, $sp, 0     # function pointer
	ld.d    $a0, $sp, 8     # argument pointer
	jirl    $ra, $t8, 0     # call the user's function
	ori     $a7, $zero, 93
	syscall	0               # child process exit
debug log:

solving db9015e6 ...
found db9015e6 in https://inbox.vuxu.org/musl/4cb6e3a.2f0.18b0d3f81eb.Coremail.huajingyun@loongson.cn/ ||
	https://inbox.vuxu.org/musl/3838b2d6-8330-33b5-fd87-8af3404a29dc@loongson.cn/ ||
	https://inbox.vuxu.org/musl/7aad7a07-9762-3d62-a8c2-4cdf860a7dcb@loongson.cn/ ||
	https://inbox.vuxu.org/musl/a5e11238-0da1-7ce2-c61b-11980a430f1d@loongson.cn/ ||
	https://inbox.vuxu.org/musl/20240125174353.GW22081@brightrain.aerifal.cx/ ||
	https://inbox.vuxu.org/musl/fde95bef-50c7-8723-3905-df834723b0cc@loongson.cn/

applying [1/6] https://inbox.vuxu.org/musl/4cb6e3a.2f0.18b0d3f81eb.Coremail.huajingyun@loongson.cn/
diff --git a/src/thread/loongarch64/clone.s b/src/thread/loongarch64/clone.s\r
new file mode 100644\r
index 00000000..db9015e6\r

1:7: trailing whitespace.
#__clone(func, stack, flags, arg, ptid, tls, ctid)\r
1:8: trailing whitespace.
#         a0,    a1,   a2,    a3,  a4,  a5,   a6\r
1:9: trailing whitespace.
# sys_clone(flags, stack, ptid, ctid, tls)\r
1:10: trailing whitespace.
#            a0,    a1,   a2,    a3,  a4\r
1:11: trailing whitespace.
\r
Checking patch src/thread/loongarch64/clone.s...
Applied patch src/thread/loongarch64/clone.s cleanly.
warning: squelched 23 whitespace errors
warning: 28 lines add whitespace errors.

skipping https://inbox.vuxu.org/musl/3838b2d6-8330-33b5-fd87-8af3404a29dc@loongson.cn/ for db9015e6
skipping https://inbox.vuxu.org/musl/7aad7a07-9762-3d62-a8c2-4cdf860a7dcb@loongson.cn/ for db9015e6
skipping https://inbox.vuxu.org/musl/a5e11238-0da1-7ce2-c61b-11980a430f1d@loongson.cn/ for db9015e6
skipping https://inbox.vuxu.org/musl/20240125174353.GW22081@brightrain.aerifal.cx/ for db9015e6
skipping https://inbox.vuxu.org/musl/fde95bef-50c7-8723-3905-df834723b0cc@loongson.cn/ for db9015e6
index at:
100644 baab9a51ee3b688a258d51c60e63f5d8b448f932	src/thread/loongarch64/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).