X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fmips%2Fclone.s;h=826716ab7f423ecdc9b2f0f7e18bdb48be17e861;hb=92e1cd9b0ba9a8fa86e0346b121e159fb88f99bc;hp=a7c2d907f05e1df5b0c17f1804180dda73bb47db;hpb=715b6403ce25110d594c7814e9cff860486a6f85;p=musl diff --git a/src/thread/mips/clone.s b/src/thread/mips/clone.s index a7c2d907..826716ab 100644 --- a/src/thread/mips/clone.s +++ b/src/thread/mips/clone.s @@ -2,9 +2,10 @@ .global __clone .type __clone,@function __clone: - # Save function pointer and argument pointer - move $25, $4 - move $8, $7 + # 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) @@ -21,6 +22,7 @@ __clone: nop jr $ra nop -1: move $4, $8 +1: lw $25, 0($sp) + lw $4, 4($sp) jr $25 nop