Fix from Bruce Evans. Commited to FreeBSD earlier this month, but was
never forwarded to me :-(. > Clean up the FP stack before returning. The i387 exp() leaked an FP > register on its first call. Subsequent calls reused the register so > the leak didn't accumulate.
This commit is contained in:
parent
50334a801c
commit
5743dc5d7a
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: e_exp.S,v 1.4 1995/05/08 23:47:04 jtc Exp $")
|
||||
RCSID("$NetBSD: e_exp.S,v 1.5 1996/06/25 02:07:09 jtc Exp $")
|
||||
|
||||
/* e^x = 2^(x * log2(e)) */
|
||||
ENTRY(__ieee754_exp)
|
||||
|
@ -20,4 +20,5 @@ ENTRY(__ieee754_exp)
|
|||
fld1
|
||||
faddp /* 2^(fract(x * log2(e))) */
|
||||
fscale /* e^x */
|
||||
fstpl %st(1)
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue