From 3f99608f823af08c833c85e84740bc182acafd71 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Mon, 28 May 2012 01:02:34 +0200 Subject: SH: feraiseexcept: Restore fpscr flag fields. --- sysdeps/sh/sh4/fpu/fraiseexcpt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sysdeps/sh/sh4/fpu') diff --git a/sysdeps/sh/sh4/fpu/fraiseexcpt.c b/sysdeps/sh/sh4/fpu/fraiseexcpt.c index a555b10..729e8bf 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) -- cgit v1.1