From d4d0ecb24474928b9dfcce6c3f09694fab2400b6 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 27 Jan 2015 06:37:10 -0600 Subject: powerpc: Fix fesetexceptflag [BZ#17885] This patch fixes a bug introduced by 18f2945ae9216cfc, where it optimizes the FPSCR set by just issuing a mtfs instruction if new flag is different from older one. The issue is a typo, where the new flag should the the new value, instead of the old one. It fixes BZ#17885. --- sysdeps/powerpc/fpu/fsetexcptflg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/powerpc/fpu/fsetexcptflg.c') diff --git a/sysdeps/powerpc/fpu/fsetexcptflg.c b/sysdeps/powerpc/fpu/fsetexcptflg.c index 5d99bf29b0..836d839285 100644 --- a/sysdeps/powerpc/fpu/fsetexcptflg.c +++ b/sysdeps/powerpc/fpu/fsetexcptflg.c @@ -40,7 +40,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) This may cause floating-point exceptions if the restored state requests it. */ if (n.l != u.l) - fesetenv_register (u.fenv); + fesetenv_register (n.fenv); /* Deal with FE_INVALID_SOFTWARE not being implemented on some chips. */ if (flag & FE_INVALID) -- cgit v1.2.1