]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/src/thread/s390x/clone.s
Update to musl 1.2.2.
[wasi-libc.git] / libc-top-half / musl / src / thread / s390x / clone.s
index 577748eab3b3ab52968792b9730487d81cdfda47..2125f20b83c759056fdc0060d12e72c1484c16e1 100644 (file)
@@ -17,6 +17,9 @@ __clone:
        # if (!tid) syscall(SYS_exit, a(d));
        # return tid;
 
+       # preserve call-saved register used as syscall arg
+       stg  %r6, 48(%r15)
+
        # create initial stack frame for new thread
        nill %r3, 0xfff8
        aghi %r3, -160
@@ -35,6 +38,9 @@ __clone:
        lg   %r6, 160(%r15)
        svc  120
 
+       # restore call-saved register
+       lg   %r6, 48(%r15)
+
        # if error or if we're the parent, return
        ltgr %r2, %r2
        bnzr %r14