fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64
[musl] / crt / sh / crti.s
index 0410ab6..d99bfd5 100644 (file)
@@ -2,12 +2,20 @@
 .global  _init
 .type    _init, @function
 _init:
+       add #-4, r15
+       mov.l r12, @-r15
+       mov.l r14, @-r15
        sts.l pr, @-r15
+       mov r15, r14
        nop
 
 .section .fini
 .global  _fini
 .type    _fini, @function
 _fini:
+       add #-4, r15
+       mov.l r12, @-r15
+       mov.l r14, @-r15
        sts.l pr, @-r15
+       mov r15, r14
        nop