about summary refs log tree commit diff
path: root/src/signal/aarch64
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal/aarch64')
-rw-r--r--src/signal/aarch64/restore.s8
-rw-r--r--src/signal/aarch64/sigsetjmp.s19
2 files changed, 27 insertions, 0 deletions
diff --git a/src/signal/aarch64/restore.s b/src/signal/aarch64/restore.s
new file mode 100644
index 00000000..d3d0243d
--- /dev/null
+++ b/src/signal/aarch64/restore.s
@@ -0,0 +1,8 @@
+.global __restore
+.type __restore,%function
+__restore:
+.global __restore_rt
+.type __restore_rt,%function
+__restore_rt:
+	mov x8,#139 // SYS_rt_sigreturn
+	svc 0
diff --git a/src/signal/aarch64/sigsetjmp.s b/src/signal/aarch64/sigsetjmp.s
new file mode 100644
index 00000000..e0f83f06
--- /dev/null
+++ b/src/signal/aarch64/sigsetjmp.s
@@ -0,0 +1,19 @@
+.global sigsetjmp
+.global __sigsetjmp
+.type sigsetjmp,%function
+.type __sigsetjmp,%function
+sigsetjmp:
+__sigsetjmp:
+	str x1,[x0,#176]
+	cbz x1,setjmp
+
+	// TODO errno?
+	// sigprocmask(SIG_SETMASK, 0, (sigset_t*)buf->__ss);
+	stp x0,x30,[sp,#-16]!
+	add x2,x0,#184
+	mov x1,#0
+	mov x0,#2
+	bl sigprocmask
+	ldp x0,x30,[sp],#16
+
+	b setjmp