diff options
Diffstat (limited to 'src/signal/riscv64')
-rw-r--r-- | src/signal/riscv64/restore.s | 8 | ||||
-rw-r--r-- | src/signal/riscv64/sigsetjmp.s | 23 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/signal/riscv64/restore.s b/src/signal/riscv64/restore.s new file mode 100644 index 00000000..40012c75 --- /dev/null +++ b/src/signal/riscv64/restore.s @@ -0,0 +1,8 @@ +.global __restore +.type __restore, %function +__restore: +.global __restore_rt +.type __restore_rt, %function +__restore_rt: + li a7, 139 # SYS_rt_sigreturn + ecall diff --git a/src/signal/riscv64/sigsetjmp.s b/src/signal/riscv64/sigsetjmp.s new file mode 100644 index 00000000..f9bc162a --- /dev/null +++ b/src/signal/riscv64/sigsetjmp.s @@ -0,0 +1,23 @@ +.global sigsetjmp +.global __sigsetjmp +.type sigsetjmp, %function +.type __sigsetjmp, %function +sigsetjmp: +__sigsetjmp: + bnez a1, 1f + tail setjmp +1: + + sd ra, 208(a0) + sd s0, 224(a0) + mv s0, a0 + + call setjmp + + mv a1, a0 + mv a0, s0 + ld s0, 224(a0) + ld ra, 208(a0) + +.hidden __sigsetjmp_tail + tail __sigsetjmp_tail |