X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fmips%2Fclone.s;h=826716ab7f423ecdc9b2f0f7e18bdb48be17e861;hb=7669d1e334e6b96455eece78da43bf830b93d697;hp=09a1a83f85aefac980c313dd104978046f1dce37;hpb=5c94367a9b0f1c1dd0deadb0f320242b59f844bb;p=musl diff --git a/src/thread/mips/clone.s b/src/thread/mips/clone.s index 09a1a83f..826716ab 100644 --- a/src/thread/mips/clone.s +++ b/src/thread/mips/clone.s @@ -2,12 +2,12 @@ .global __clone .type __clone,@function __clone: - # Save function pointer and argument pointer - move $25, $4 - move $8, $7 - # Shuffle (fn,sp,fl,arg,ptid,tls,ctid) to (sp,fl,ptid,tls,ctid) - move $4, $5 - move $5, $6 + # Save function pointer and argument pointer on new thread stack + 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) @@ -22,6 +22,7 @@ __clone: nop jr $ra nop -1: move $4, $8 +1: lw $25, 0($sp) + lw $4, 4($sp) jr $25 nop