diff options
Diffstat (limited to 'lib/libc/i386/gen')
-rw-r--r-- | lib/libc/i386/gen/_setjmp.S | 20 | ||||
-rw-r--r-- | lib/libc/i386/gen/alloca.S | 6 | ||||
-rw-r--r-- | lib/libc/i386/gen/fabs.S | 6 | ||||
-rw-r--r-- | lib/libc/i386/gen/modf.S | 7 | ||||
-rw-r--r-- | lib/libc/i386/gen/setjmp.S | 25 |
5 files changed, 27 insertions, 37 deletions
diff --git a/lib/libc/i386/gen/_setjmp.S b/lib/libc/i386/gen/_setjmp.S index 7aa3e69..47e319a 100644 --- a/lib/libc/i386/gen/_setjmp.S +++ b/lib/libc/i386/gen/_setjmp.S @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * William Jolitz. @@ -35,8 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)_setjmp.s 5.1 (Berkeley) 4/23/90" - .align 2,0x90 + .asciz "@(#)_setjmp.s 8.1 (Berkeley) 6/4/93" #endif /* LIBC_SCCS and not lint */ /* @@ -45,7 +44,7 @@ * _longjmp(a,v) * will generate a "return(v)" from the last call to * _setjmp(a) - * by restoring registers from the environment 'a'. + * by restoring registers from the stack. * The previous signal state is NOT restored. */ @@ -60,8 +59,7 @@ ENTRY(_setjmp) movl %ebp,12(%eax) movl %esi,16(%eax) movl %edi,20(%eax) - fnstcw 28(%eax) - xorl %eax,%eax + movl $0,%eax ret ENTRY(_longjmp) @@ -73,10 +71,8 @@ ENTRY(_longjmp) movl 12(%edx),%ebp movl 16(%edx),%esi movl 20(%edx),%edi - fninit - fldcw 28(%edx) - testl %eax,%eax - jnz 1f - incl %eax + cmpl $0,%eax + jne 1f + movl $1,%eax 1: movl %ecx,0(%esp) ret diff --git a/lib/libc/i386/gen/alloca.S b/lib/libc/i386/gen/alloca.S index 65378f5..a2d6a41 100644 --- a/lib/libc/i386/gen/alloca.S +++ b/lib/libc/i386/gen/alloca.S @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * William Jolitz. @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)alloca.s 5.2 (Berkeley) 5/14/90" + .asciz "@(#)alloca.s 8.1 (Berkeley) 6/4/93" #endif /* LIBC_SCCS and not lint */ /* like alloc, but automatic automatic free in return */ diff --git a/lib/libc/i386/gen/fabs.S b/lib/libc/i386/gen/fabs.S index 2519e8b..40e72c8 100644 --- a/lib/libc/i386/gen/fabs.S +++ b/lib/libc/i386/gen/fabs.S @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * William Jolitz. @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)fabs.s 5.2 (Berkeley) 12/17/90" + .asciz "@(#)fabs.s 8.1 (Berkeley) 6/4/93" #endif /* LIBC_SCCS and not lint */ #include "DEFS.h" diff --git a/lib/libc/i386/gen/modf.S b/lib/libc/i386/gen/modf.S index 246729f..2551237 100644 --- a/lib/libc/i386/gen/modf.S +++ b/lib/libc/i386/gen/modf.S @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Sean Eric Fagan. @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)modf.s 5.5 (Berkeley) 3/18/91" + .asciz "@(#)modf.s 8.1 (Berkeley) 6/4/93" #endif /* LIBC_SCCS and not lint */ /* @@ -49,7 +49,6 @@ /* With CHOP mode on, frndint behaves as TRUNC does. Useful. */ .text .globl _modf -.type _modf,@function _modf: pushl %ebp movl %esp,%ebp diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S index d9fc66e..b24da11 100644 --- a/lib/libc/i386/gen/setjmp.S +++ b/lib/libc/i386/gen/setjmp.S @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * William Jolitz. @@ -35,8 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)setjmp.s 5.1 (Berkeley) 4/23/90" - .align 2,0x90 + .asciz "@(#)setjmp.s 8.1 (Berkeley) 6/4/93" #endif /* LIBC_SCCS and not lint */ /* @@ -45,16 +44,15 @@ * longjmp(a,v) * will generate a "return(v)" from the last call to * setjmp(a) - * by restoring registers from the environment 'a'. + * by restoring registers from the stack. * The previous signal state is restored. */ #include "DEFS.h" -#include "SYS.h" ENTRY(setjmp) pushl $0 - call PIC_PLT(_sigblock) + call _sigblock popl %edx movl 4(%esp),%ecx movl 0(%esp),%edx @@ -65,14 +63,13 @@ ENTRY(setjmp) movl %esi,16(%ecx) movl %edi,20(%ecx) movl %eax,24(%ecx) - fnstcw 28(%ecx) - xorl %eax,%eax + movl $0,%eax ret ENTRY(longjmp) movl 4(%esp),%edx pushl 24(%edx) - call PIC_PLT(_sigsetmask) /* XXX this is not reentrant */ + call _sigsetmask popl %eax movl 4(%esp),%edx movl 8(%esp),%eax @@ -82,10 +79,8 @@ ENTRY(longjmp) movl 12(%edx),%ebp movl 16(%edx),%esi movl 20(%edx),%edi - fninit - fldcw 28(%edx) - testl %eax,%eax - jnz 1f - incl %eax + cmpl $0,%eax + jne 1f + movl $1,%eax 1: movl %ecx,0(%esp) ret |