The scalb* functions left data on the floting point register stack.

Remove it before leaving the function.

The solution is taken from OpenBSD.
This commit is contained in:
kristerw 1999-01-02 05:15:40 +00:00
parent 1a097ef45d
commit 14e0e5307d
3 changed files with 6 additions and 3 deletions

View File

@ -5,10 +5,11 @@
#include <machine/asm.h>
RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/08 23:49:52 jtc Exp $")
RCSID("$NetBSD: e_scalb.S,v 1.5 1999/01/02 05:15:40 kristerw Exp $")
ENTRY(__ieee754_scalb)
fldl 12(%esp)
fldl 4(%esp)
fscale
fstp %st(1) /* bug fix for fp stack overflow */
ret

View File

@ -5,10 +5,11 @@
#include <machine/asm.h>
RCSID("$NetBSD: s_scalbn.S,v 1.4 1995/05/09 00:19:06 jtc Exp $")
RCSID("$NetBSD: s_scalbn.S,v 1.5 1999/01/02 05:15:40 kristerw Exp $")
ENTRY(scalbn)
fildl 12(%esp)
fldl 4(%esp)
fscale
fstp %st(1) /* bug fix for fp stack overflow */
ret

View File

@ -5,10 +5,11 @@
#include <machine/asm.h>
RCSID("$NetBSD: s_scalbnf.S,v 1.3 1995/05/09 00:19:59 jtc Exp $")
RCSID("$NetBSD: s_scalbnf.S,v 1.4 1999/01/02 05:15:40 kristerw Exp $")
ENTRY(scalbnf)
fildl 8(%esp)
flds 4(%esp)
fscale
fstp %st(1) /* bug fix for fp stack overflow */
ret