diff options
author | Nicholas J. Kain <njkain@gmail.com> | 2011-02-15 07:32:09 -0500 |
---|---|---|
committer | Nicholas J. Kain <njkain@gmail.com> | 2011-02-15 07:32:09 -0500 |
commit | 1e12632591ab98a6ea3af8680716c28282552981 (patch) | |
tree | 5b79bd9a0b950d6ab414fef8cbb5dfcd1a6d2e83 /src/signal | |
parent | c2afb747b0296f23cd1903e82ccbdee3fc2978fd (diff) | |
download | musl-1e12632591ab98a6ea3af8680716c28282552981.zip musl-1e12632591ab98a6ea3af8680716c28282552981.tar.gz musl-1e12632591ab98a6ea3af8680716c28282552981.tar.bz2 |
Port musl to x86-64. One giant commit!
Diffstat (limited to 'src/signal')
-rw-r--r-- | src/signal/x86_64/restore.s | 11 | ||||
-rw-r--r-- | src/signal/x86_64/sigsetjmp.s | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/signal/x86_64/restore.s b/src/signal/x86_64/restore.s new file mode 100644 index 0000000..bc5e0d7 --- /dev/null +++ b/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/src/signal/x86_64/sigsetjmp.s b/src/signal/x86_64/sigsetjmp.s new file mode 100644 index 0000000..0a45078 --- /dev/null +++ b/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 |