mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-10 16:42:59 +03:00
fix broken sigsetjmp on x86_64
This commit is contained in:
parent
7168790763
commit
60685ecad1
@ -1,11 +1,13 @@
|
|||||||
/* Copyright 2011 Nicholas J. Kain, licensed GNU LGPL 2.1 or later */
|
/* Copyright 2011 Nicholas J. Kain, licensed GNU LGPL 2.1 or later */
|
||||||
.global sigsetjmp
|
.global sigsetjmp
|
||||||
sigsetjmp:
|
sigsetjmp:
|
||||||
test %rsi,%rsi
|
andl %esi,%esi
|
||||||
jz 1f /* if save == 0, just goto setjmp */
|
movq %rsi,64(%rdi)
|
||||||
movq %rsi,64(%rdi) /* move save -> jmp_buf[8] */
|
jz 1f
|
||||||
addq $72,%rdi /* add sizeof(jmp_buf) to rdi */
|
pushq %rdi
|
||||||
movl $0,%esi /* arg2 = 0 */
|
leaq 72(%rdi),%rsi
|
||||||
movl $2,%edx /* arg3 = 2 */
|
xorl %edx,%edx
|
||||||
call sigprocmask /* sigprocmask(jmp_buf, 0, 2) */
|
movl $2,%edi
|
||||||
|
call sigprocmask
|
||||||
|
popq %rdi
|
||||||
1: jmp setjmp
|
1: jmp setjmp
|
||||||
|
Loading…
Reference in New Issue
Block a user