- subl $2,%esp
- fnstcw (%esp) // save FP control word
- fninit // reset FP coprocessor
- fldcw (%esp) // restore FP control word
- addl $2,%esp
- movl 4(%esp), %eax // address of jmp_buf (saved context)
- movl 8(%esp), %edx // return value
- movl %edx, JB_EAX(%eax) // return value into saved context
- movl $ SYS_sigreturn, %eax // sigreturn system call
- UNIX_SYSCALL_TRAP
- addl $8, %esp
- CALL_EXTERN(_longjmperror)
- CALL_EXTERN(_abort)
+ movl 4(%esp), %ecx // address of jmp_buf (saved context)
+ movl JB_MASK(%ecx),%eax // get the mask
+ subl $12, %esp // Make sure the stack is 16-byte
+ // aligned when we call sigprocmask
+ pushl %eax // store the mask
+ movl %esp, %edx // save the address where we stored the mask
+ pushl $0 // oset = NULL
+ pushl %edx // set
+ pushl $3 // how = SIG_SETMASK
+ CALL_EXTERN_AGAIN(_sigprocmask)
+ addl $28, %esp // restore original esp
+
+ movl 4(%esp), %ecx // address of jmp_buf
+ movl JB_ONSTACK(%ecx), %eax // ss_flags
+ subl $8, %esp
+ pushl %eax
+ CALL_EXTERN(__sigunaltstack)
+ addl $12, %esp
+
+L_do__longjmp:
+ BRANCH_EXTERN(__longjmp) // else