projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix child stack alignment on mips clone
[musl]
/
src
/
thread
/
mips
/
clone.s
1
.set noreorder
2
.global __clone
3
.type __clone,@function
4
__clone:
5
# Save function pointer and argument pointer on new thread stack
6
and $5, $5, -8
7
subu $5, $5, 16
8
sw $4, 0($5)
9
sw $7, 4($5)
10
# Shuffle (fn,sp,fl,arg,ptid,tls,ctid) to (fl,sp,ptid,tls,ctid)
11
move $4, $6
12
lw $6, 16($sp)
13
lw $7, 20($sp)
14
lw $9, 24($sp)
15
sw $9, 16($sp)
16
li $2, 4120
17
syscall
18
beq $7, $0, 1f
19
nop
20
jr $ra
21
subu $2, $0, $2
22
1: beq $2, $0, 1f
23
nop
24
jr $ra
25
nop
26
1: lw $25, 0($sp)
27
lw $4, 4($sp)
28
jr $25
29
nop