summaryrefslogtreecommitdiff
path: root/05/musl-0.6.0/src/signal/x86_64
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-20 13:18:21 -0800
committerpommicket <pommicket@gmail.com>2022-02-20 13:18:21 -0800
commit9bc8a11afeed3569736b89754012e3ca22ee10f6 (patch)
tree5f0ec0d5c05f879b1ee86adfa654ed3ef2178d5f /05/musl-0.6.0/src/signal/x86_64
parent0f97a589b800bdb71dda05984192f0f66a52edaa (diff)
conclusion
Diffstat (limited to '05/musl-0.6.0/src/signal/x86_64')
-rw-r--r--05/musl-0.6.0/src/signal/x86_64/restore.s11
-rw-r--r--05/musl-0.6.0/src/signal/x86_64/sigsetjmp.s11
2 files changed, 22 insertions, 0 deletions
diff --git a/05/musl-0.6.0/src/signal/x86_64/restore.s b/05/musl-0.6.0/src/signal/x86_64/restore.s
new file mode 100644
index 0000000..bc5e0d7
--- /dev/null
+++ b/05/musl-0.6.0/src/signal/x86_64/restore.s
@@ -0,0 +1,11 @@
+.global __restore_rt
+.global __restore
+.type __restore_rt,%function
+.type __restore,%function
+__restore_rt:
+__restore:
+ movl $15, %eax
+ syscall
+.size __restore_rt,.-__restore_rt
+.size __restore,.-__restore
+
diff --git a/05/musl-0.6.0/src/signal/x86_64/sigsetjmp.s b/05/musl-0.6.0/src/signal/x86_64/sigsetjmp.s
new file mode 100644
index 0000000..0a45078
--- /dev/null
+++ b/05/musl-0.6.0/src/signal/x86_64/sigsetjmp.s
@@ -0,0 +1,11 @@
+/* Copyright 2011 Nicholas J. Kain, licensed GNU LGPL 2.1 or later */
+.global sigsetjmp
+sigsetjmp:
+ test %rsi,%rsi
+ jz 1f /* if save == 0, just goto setjmp */
+ movq %rsi,64(%rdi) /* move save -> jmp_buf[8] */
+ addq $72,%rdi /* add sizeof(jmp_buf) to rdi */
+ movl $0,%esi /* arg2 = 0 */
+ movl $2,%edx /* arg3 = 2 */
+ call sigprocmask /* sigprocmask(jmp_buf, 0, 2) */
+1: jmp setjmp