From 55c99d38c42b7c6ed89ada018769859b0adbcf62 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Wed, 25 Apr 2007 17:36:32 +0000 Subject: [PATCH] 2007-04-25 Patrick Mansfield * feholdexcept.h: Use *envp not env so we clear the proper bits in the fpscr, and don't set some random ones. --- newlib/ChangeLog | 5 +++++ newlib/libm/machine/spu/headers/feholdexcept.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 70db12e185..880810c349 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2007-04-25 Patrick Mansfield + + * libm/machine/spu/headers/feholdexcept.h: Use *envp not env so + we clear the proper bits in the fpscr, and don't set some random ones. + 2007-04-24 Eric Blake * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinity diff --git a/newlib/libm/machine/spu/headers/feholdexcept.h b/newlib/libm/machine/spu/headers/feholdexcept.h index d75695afa3..9f6bd521b5 100644 --- a/newlib/libm/machine/spu/headers/feholdexcept.h +++ b/newlib/libm/machine/spu/headers/feholdexcept.h @@ -44,7 +44,7 @@ static __inline int _feholdexcept(fenv_t *envp) fpscr = spu_mffpscr(); *envp = __pack_fpscr(fpscr); - env = env & ~FE_ALL_EXCEPT; + env = *envp & ~FE_ALL_EXCEPT; spu_mtfpscr(__unpack_fpscr(env)); return (0); } -- 2.11.0