If rip is in the range [1,2), the syscall hasn't been started yet */
/* Set the signal mask which should be current during the syscall. */
- /* GrP fixme signals
- DDD: JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
- movq $__NR_rt_sigprocmask, %rax // syscall #
- movq $VKI_SIG_SETMASK, %rdi // how
+ movq $$__NR___pthread_sigmask, %rax // syscall #
+ movq $$VKI_SIG_SETMASK, %rdi // how
movq -24(%rbp), %rsi // sysmask
movq -32(%rbp), %rdx // postmask
- movq -40(%rbp), %r10 // sigsetSzB in r10 not rcx
- DDD: fixme return address
syscall
- jnc 7f // sigprocmask failed
- */
+ jc L_$0_7 // sigprocmask failed
/* OK, that worked. Now do the syscall proper. */
L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall
is complete and we needn't worry about it. */
- /* GrP fixme signals
- DDD: JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
- PUSH_di_si_dx_cx_8
-
- movq $__NR_rt_sigprocmask, %rax // syscall #
- movq $VKI_SIG_SETMASK, %rdi // how
- movq %rcx, %rsi // postmask
+ movq $$__NR___pthread_sigmask, %rax // syscall #
+ movq $$VKI_SIG_SETMASK, %rdi // how
+ movq -32(%rbp), %rsi // postmask
xorq %rdx, %rdx // NULL
- movq %r8, %r10 // sigsetSzB
- DDD: fixme return address
syscall
- POP_di_si_dx_cx_8
+ jc L_$0_7 // sigprocmask failed
- jnc 7f // sigprocmask failed
- */
L_$0_5: /* now safe from signals */
movq $$0, %rax /* SUCCESS */
movq %rbp, %rsp
popq %rbp
ret
-/* GrP fixme signals
L_$0_7: // failure: return 0x8000 | error code
- DDD: fixme return value
+ andq $$0x7FFF, %rax
+ orq $$0x8000, %rax
movq %rbp, %rsp
popq %rbp
ret
-*/
.endmacro