summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/signal/aarch64
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/signal/aarch64')
-rw-r--r--libc-top-half/musl/src/signal/aarch64/restore.s10
-rw-r--r--libc-top-half/musl/src/signal/aarch64/sigsetjmp.s21
2 files changed, 31 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/aarch64/restore.s b/libc-top-half/musl/src/signal/aarch64/restore.s
new file mode 100644
index 0000000..d4e5fcf
--- /dev/null
+++ b/libc-top-half/musl/src/signal/aarch64/restore.s
@@ -0,0 +1,10 @@
+.global __restore
+.hidden __restore
+.type __restore,%function
+__restore:
+.global __restore_rt
+.hidden __restore_rt
+.type __restore_rt,%function
+__restore_rt:
+ mov x8,#139 // SYS_rt_sigreturn
+ svc 0
diff --git a/libc-top-half/musl/src/signal/aarch64/sigsetjmp.s b/libc-top-half/musl/src/signal/aarch64/sigsetjmp.s
new file mode 100644
index 0000000..75910c4
--- /dev/null
+++ b/libc-top-half/musl/src/signal/aarch64/sigsetjmp.s
@@ -0,0 +1,21 @@
+.global sigsetjmp
+.global __sigsetjmp
+.type sigsetjmp,%function
+.type __sigsetjmp,%function
+sigsetjmp:
+__sigsetjmp:
+ cbz x1,setjmp
+
+ str x30,[x0,#176]
+ str x19,[x0,#176+8+8]
+ mov x19,x0
+
+ bl setjmp
+
+ mov w1,w0
+ mov x0,x19
+ ldr x30,[x0,#176]
+ ldr x19,[x0,#176+8+8]
+
+.hidden __sigsetjmp_tail
+ b __sigsetjmp_tail