clone.s\mips\thread\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/thread/mips/clone.s
blob: 229b987e96919cc9f8ef806cd5a5833060f58b91 (plain) (blame)
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
.set noreorder
.global __clone
.hidden __clone
.type __clone,@function
__clone:
	# Save function pointer and argument pointer on new thread stack
	and 5,ドル 5,ドル -8
	subu 5,ドル 5,ドル 16
	sw 4,ドル 0(5ドル)
	sw 7,ドル 4(5ドル)
	# Shuffle (fn,sp,fl,arg,ptid,tls,ctid) to (fl,sp,ptid,tls,ctid)
	move 4,ドル 6ドル
	lw 6,ドル 16($sp)
	lw 7,ドル 20($sp)
	lw 9,ドル 24($sp)
	subu $sp, $sp, 16
	sw 9,ドル 16($sp)
	li 2,ドル 4120
	syscall
	beq 7,ドル 0,ドル 1f
	nop
	addu $sp, $sp, 16
	jr $ra
	subu 2,ドル 0,ドル 2ドル
1:	beq 2,ドル 0,ドル 1f
	nop
	addu $sp, $sp, 16
	jr $ra
	nop
1:	move $fp, 0ドル
	lw 25,ドル 0($sp)
	lw 4,ドル 4($sp)
	jalr 25ドル
	nop
	move 4,ドル 2ドル
	li 2,ドル 4001
	syscall
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月21日 08:19:44 +0000

AltStyle によって変換されたページ (->オリジナル) /