diff options
Diffstat (limited to 'libc-top-half/musl/src/signal/x32')
-rw-r--r-- | libc-top-half/musl/src/signal/x32/getitimer.c | 7 | ||||
-rw-r--r-- | libc-top-half/musl/src/signal/x32/restore.s | 8 | ||||
-rw-r--r-- | libc-top-half/musl/src/signal/x32/setitimer.c | 7 | ||||
-rw-r--r-- | libc-top-half/musl/src/signal/x32/sigsetjmp.s | 25 |
4 files changed, 47 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/x32/getitimer.c b/libc-top-half/musl/src/signal/x32/getitimer.c new file mode 100644 index 0000000..8a8046a --- /dev/null +++ b/libc-top-half/musl/src/signal/x32/getitimer.c @@ -0,0 +1,7 @@ +#include <sys/time.h> +#include "syscall.h" + +int getitimer(int which, struct itimerval *old) +{ + return syscall(SYS_getitimer, which, old); +} diff --git a/libc-top-half/musl/src/signal/x32/restore.s b/libc-top-half/musl/src/signal/x32/restore.s new file mode 100644 index 0000000..1117446 --- /dev/null +++ b/libc-top-half/musl/src/signal/x32/restore.s @@ -0,0 +1,8 @@ + nop +.global __restore_rt +.hidden __restore_rt +.type __restore_rt,@function +__restore_rt: + mov $0x40000201, %rax /* SYS_rt_sigreturn */ + syscall +.size __restore_rt,.-__restore_rt diff --git a/libc-top-half/musl/src/signal/x32/setitimer.c b/libc-top-half/musl/src/signal/x32/setitimer.c new file mode 100644 index 0000000..21b1f45 --- /dev/null +++ b/libc-top-half/musl/src/signal/x32/setitimer.c @@ -0,0 +1,7 @@ +#include <sys/time.h> +#include "syscall.h" + +int setitimer(int which, const struct itimerval *restrict new, struct itimerval *restrict old) +{ + return syscall(SYS_setitimer, which, new, old); +} diff --git a/libc-top-half/musl/src/signal/x32/sigsetjmp.s b/libc-top-half/musl/src/signal/x32/sigsetjmp.s new file mode 100644 index 0000000..1f02b0e --- /dev/null +++ b/libc-top-half/musl/src/signal/x32/sigsetjmp.s @@ -0,0 +1,25 @@ +.global sigsetjmp +.global __sigsetjmp +.type sigsetjmp,@function +.type __sigsetjmp,@function +sigsetjmp: +__sigsetjmp: + test %esi,%esi + jz 1f + + popq 64(%rdi) + mov %rbx,72+8(%rdi) + mov %rdi,%rbx + + call setjmp@PLT + + pushq 64(%rbx) + movl $0, 4(%rsp) + mov %rbx,%rdi + mov %eax,%esi + mov 72+8(%rbx),%rbx + +.hidden __sigsetjmp_tail + jmp __sigsetjmp_tail + +1: jmp setjmp@PLT |