aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Dal'Ava Junior <alfredo@FreeBSD.org>2020-11-17 12:36:59 +0000
committerAlfredo Dal'Ava Junior <alfredo@FreeBSD.org>2020-11-17 12:36:59 +0000
commite7bd4f846f0c9185aebfd3d116bb78ab137280fa (patch)
treecbd024ab6cc13241d26c255452cf4b1f645197e3
parent23f001f742d1cee649bde91ec8a787dc343ad1f8 (diff)
downloadsrc-e7bd4f846f0c9185aebfd3d116bb78ab137280fa.tar.gz
src-e7bd4f846f0c9185aebfd3d116bb78ab137280fa.zip
[POWERPC] msun: fix incorrect flag in fesetexceptflag
Fix incorrect mask being used when FE_INVALID bit is wanted by user. The problem was noticed thanks to msun fenv tests. Reviewed by: jhibbits, luporl Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D27201
Notes
Notes: svn path=/head/; revision=367761
-rw-r--r--lib/msun/powerpc/fenv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msun/powerpc/fenv.h b/lib/msun/powerpc/fenv.h
index 22bc4e0f902f..d054220678c2 100644
--- a/lib/msun/powerpc/fenv.h
+++ b/lib/msun/powerpc/fenv.h
@@ -148,7 +148,7 @@ fesetexceptflag(const fexcept_t *__flagp, int __excepts)
union __fpscr __r;
if (__excepts & FE_INVALID)
- __excepts |= FE_ALL_EXCEPT;
+ __excepts |= FE_ALL_INVALID;
__mffs(&__r);
__r.__bits.__reg &= ~__excepts;
__r.__bits.__reg |= *__flagp & __excepts;