Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/lib/libm/arch/i387 Pull up revision 1.7 (requested by f...



details:   https://anonhg.NetBSD.org/src/rev/1517f322db17
branches:  netbsd-1-5
changeset: 493019:1517f322db17
user:      he <he%NetBSD.org@localhost>
date:      Thu Mar 28 22:55:31 2002 +0000

description:
Pull up revision 1.7 (requested by fvdl):
  Fix stack usage so that a signal delivered in ceil() or floor()
  no longer corrupts the stack.

diffstat:

 lib/libm/arch/i387/s_floor.S |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (34 lines):

diff -r 49dd659e4a91 -r 1517f322db17 lib/libm/arch/i387/s_floor.S
--- a/lib/libm/arch/i387/s_floor.S      Thu Mar 28 22:55:09 2002 +0000
+++ b/lib/libm/arch/i387/s_floor.S      Thu Mar 28 22:55:31 2002 +0000
@@ -5,24 +5,24 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: s_floor.S,v 1.4 1995/05/09 00:01:59 jtc Exp $")
+RCSID("$NetBSD: s_floor.S,v 1.4.16.1 2002/03/28 22:55:31 he Exp $")
 
 ENTRY(floor)
        pushl   %ebp
        movl    %esp,%ebp
        subl    $8,%esp
 
-       fstcw   -12(%ebp)               /* store fpu control word */
-       movw    -12(%ebp),%dx
+       fstcw   -4(%ebp)                /* store fpu control word */
+       movw    -4(%ebp),%dx
        orw     $0x0400,%dx             /* round towards -oo */
        andw    $0xf7ff,%dx
-       movw    %dx,-16(%ebp)
-       fldcw   -16(%ebp)               /* load modfied control word */
+       movw    %dx,-8(%ebp)
+       fldcw   -8(%ebp)                /* load modfied control word */
 
        fldl    8(%ebp);                /* round */
        frndint
 
-       fldcw   -12(%ebp)               /* restore original control word */
+       fldcw   -4(%ebp)                /* restore original control word */
 
        leave
        ret



Home | Main Index | Thread Index | Old Index