diff options
author | bde <bde@FreeBSD.org> | 1994-10-25 14:08:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1994-10-25 14:08:13 +0000 |
commit | 4c2e71825c29b3dd064e493c10781700c7ff7fef (patch) | |
tree | fac4bed9c8f99b3012cab3e910df4e8ba36f1ee9 /lib/libc/i386 | |
parent | ae73fa840b9e5068483cd22112c1e3ef950de784 (diff) | |
download | FreeBSD-src-4c2e71825c29b3dd064e493c10781700c7ff7fef.zip FreeBSD-src-4c2e71825c29b3dd064e493c10781700c7ff7fef.tar.gz |
Reenable sigsetjmp.S. Preserve the FP state. Rearrange offsets
to match setjmp.S.
Diffstat (limited to 'lib/libc/i386')
-rw-r--r-- | lib/libc/i386/gen/Makefile.inc | 2 | ||||
-rw-r--r-- | lib/libc/i386/gen/sigsetjmp.S | 30 |
2 files changed, 25 insertions, 7 deletions
diff --git a/lib/libc/i386/gen/Makefile.inc b/lib/libc/i386/gen/Makefile.inc index 356f325..40f2788 100644 --- a/lib/libc/i386/gen/Makefile.inc +++ b/lib/libc/i386/gen/Makefile.inc @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 SRCS+= isinf.c infinity.c -SRCS+= _setjmp.S alloca.S fabs.S ldexp.c modf.S setjmp.S +SRCS+= _setjmp.S alloca.S fabs.S ldexp.c modf.S setjmp.S sigsetjmp.S SRCS+= divsi3.S fixdfsi.S fixunsdfsi.S udivsi3.S diff --git a/lib/libc/i386/gen/sigsetjmp.S b/lib/libc/i386/gen/sigsetjmp.S index 6c24386..f4f7760 100644 --- a/lib/libc/i386/gen/sigsetjmp.S +++ b/lib/libc/i386/gen/sigsetjmp.S @@ -35,28 +35,43 @@ * * * from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90" - * $Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $ + * $Id: sigsetjmp.S,v 1.1 1994/08/05 01:18:08 wollman Exp $ */ #if defined(LIBC_SCCS) && !defined(lint) .text - .asciz "$Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $" + .asciz "$Id: sigsetjmp.S,v 1.1 1994/08/05 01:18:08 wollman Exp $" #endif /* LIBC_SCCS and not lint */ #include "DEFS.h" #include "SYS.h" +/*- + * TODO: + * Rename sigsetjmp to __sigsetjmp and siglongjmp to __siglongjmp, + * remove the other *jmp functions and define everything in terms + * of the renamed functions. This requires compiler support for + * the renamed functions (introduced in gcc-2.5.3; previous versions + * only supported *jmp with 0 or 1 leading underscores). + * + * Use sigprocmask() instead of sigblock() and sigsetmask(), and + * check for and handle errors. + * + * Restore _all_ the registers and the signal mask atomically. Can + * use sigreturn() if sigreturn() works. + */ + ENTRY(sigsetjmp) movl 8(%esp),%eax movl 4(%esp),%ecx - movl %eax,24(%ecx) + movl %eax,32(%ecx) testl %eax,%eax jz 1f pushl $0 call PIC_PLT(_sigblock) addl $4,%esp movl 4(%esp),%ecx - movl %eax,28(%ecx) + movl %eax,24(%ecx) 1: movl 0(%esp),%edx movl %edx, 0(%ecx) movl %ebx, 4(%ecx) @@ -64,14 +79,15 @@ ENTRY(sigsetjmp) movl %ebp,12(%ecx) movl %esi,16(%ecx) movl %edi,20(%ecx) + fnstcw 28(%ecx) xorl %eax,%eax ret ENTRY(siglongjmp) movl 4(%esp),%edx - cmpl $0,24(%edx) + cmpl $0,32(%edx) jz 1f - pushl 28(%edx) + pushl 24(%edx) call PIC_PLT(_sigsetmask) addl $4,%esp 1: movl 4(%esp),%edx @@ -82,6 +98,8 @@ ENTRY(siglongjmp) movl 12(%edx),%ebp movl 16(%edx),%esi movl 20(%edx),%edi + fninit + fldcw 28(%edx) testl %eax,%eax jnz 2f incl %eax |