summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/signal/i386
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/signal/i386')
-rw-r--r--libc-top-half/musl/src/signal/i386/restore.s14
-rw-r--r--libc-top-half/musl/src/signal/i386/sigsetjmp.s26
2 files changed, 40 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/i386/restore.s b/libc-top-half/musl/src/signal/i386/restore.s
new file mode 100644
index 0000000..ccc9430
--- /dev/null
+++ b/libc-top-half/musl/src/signal/i386/restore.s
@@ -0,0 +1,14 @@
+.global __restore
+.hidden __restore
+.type __restore,@function
+__restore:
+ popl %eax
+ movl $119, %eax
+ int $0x80
+
+.global __restore_rt
+.hidden __restore_rt
+.type __restore_rt,@function
+__restore_rt:
+ movl $173, %eax
+ int $0x80
diff --git a/libc-top-half/musl/src/signal/i386/sigsetjmp.s b/libc-top-half/musl/src/signal/i386/sigsetjmp.s
new file mode 100644
index 0000000..690b251
--- /dev/null
+++ b/libc-top-half/musl/src/signal/i386/sigsetjmp.s
@@ -0,0 +1,26 @@
+.global sigsetjmp
+.global __sigsetjmp
+.type sigsetjmp,@function
+.type __sigsetjmp,@function
+sigsetjmp:
+__sigsetjmp:
+ mov 8(%esp),%ecx
+ jecxz 1f
+
+ mov 4(%esp),%eax
+ popl 24(%eax)
+ mov %ebx,28+8(%eax)
+ mov %eax,%ebx
+
+.hidden ___setjmp
+ call ___setjmp
+
+ pushl 24(%ebx)
+ mov %ebx,4(%esp)
+ mov %eax,8(%esp)
+ mov 28+8(%ebx),%ebx
+
+.hidden __sigsetjmp_tail
+ jmp __sigsetjmp_tail
+
+1: jmp ___setjmp