mailing list of musl libc
 help / color / mirror / code / Atom feed
30dbaccba2a0231f2f97cba6c71ec43d0c439d99 blob 807 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
 
.set noreorder
.global __clone
.type __clone,@function
__clone:
	# Save function pointer and argument pointer on new thread stack
	and	$5, $5, -16		# aligning stack to double word 
	dsubu	$5, $5, 16
	sd	$4, 0($5)		# save function pointer
	sd	$7, 8($5)		# save argument pointer
	# Shuffle (fn,sp,fl,arg,ptid,tls,ctid) to (fl,sp,ptid,tls,ctid)
	# sys_clone(u64 flags, u64 ustack_base, u64 parent_tidptr, u64 child_tidptr, u64 tls)
	move	$4, $6
	move	$6, $8
	move	$7, $9
	move	$8, $10
	li	$2, 5055	# system call number of sys_clone for mips n64 ABI
	syscall
	beq	$7, $0, 1f
	nop		# delay slot
	jr	$ra
	dsubu	$2, $0, $2	# delay slot
1:	beq	$2, $0, 1f
	nop		# delay slot
	jr	$ra
	nop		# delay slot
1:	ld	$25, 0($sp)		# function pointer
	ld	$4, 8($sp)		# argument pointer
	jr	$25		# call the user's function
	nop
debug log:

solving 30dbacc ...
found 30dbacc in https://inbox.vuxu.org/musl/BD7773622145634B952E5B54ACA8E349AA2444A6@PUMAIL01.pu.imgtec.org/ ||
	https://inbox.vuxu.org/musl/DE16056458B9894F9D46202EC1BBB28B3BE15ED6@PUMAIL01.pu.imgtec.org/

applying [1/2] https://inbox.vuxu.org/musl/BD7773622145634B952E5B54ACA8E349AA2444A6@PUMAIL01.pu.imgtec.org/
diff --git a/src/thread/mips64/clone.s b/src/thread/mips64/clone.s
new file mode 100644
index 0000000..30dbacc

1:12: trailing whitespace.
	and	$5, $5, -16		# aligning stack to double word 
Checking patch src/thread/mips64/clone.s...
Applied patch src/thread/mips64/clone.s cleanly.
warning: 1 line adds whitespace errors.

skipping https://inbox.vuxu.org/musl/DE16056458B9894F9D46202EC1BBB28B3BE15ED6@PUMAIL01.pu.imgtec.org/ for 30dbacc
index at:
100644 30dbaccba2a0231f2f97cba6c71ec43d0c439d99	src/thread/mips64/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).