From: Kaz Kojima Date: Sun, 27 May 2012 23:02:34 +0000 (+0200) Subject: SH: feraiseexcept: Restore fpscr flag fields. X-Git-Tag: glibc-2.16-tps~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f99608f823af08c833c85e84740bc182acafd71;p=thirdparty%2Fglibc.git SH: feraiseexcept: Restore fpscr flag fields. --- diff --git a/ChangeLog b/ChangeLog index 65de57e57bb..3d1bc8f8924 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-27 Kaz Kojima + + * sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Restore fpscr flag + fields. + 2012-05-27 Chung-Lin Tang * sysdeps/sh/_mcount.S (_mount): Add CFI directives. diff --git a/sysdeps/sh/sh4/fpu/fraiseexcpt.c b/sysdeps/sh/sh4/fpu/fraiseexcpt.c index a555b108852..729e8bf3ecf 100644 --- a/sysdeps/sh/sh4/fpu/fraiseexcpt.c +++ b/sysdeps/sh/sh4/fpu/fraiseexcpt.c @@ -60,6 +60,14 @@ feraiseexcept (int excepts) __asm__ __volatile__ ("fmul %1, %0" : "+d" (d) : "d" (x)); } + { + /* Restore flag fields. */ + fpu_control_t cw; + _FPU_GETCW (cw); + cw |= (excepts & FE_ALL_EXCEPT); + _FPU_SETCW (cw); + } + return 0; } libm_hidden_def (feraiseexcept)