diff options
Diffstat (limited to 'libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c')
-rw-r--r-- | libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c b/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c index a555b1088..729e8bf3e 100644 --- a/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c +++ b/libc/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) |