Module Name: src Committed By: rin Date: Tue Sep 13 01:22:12 UTC 2022
Modified Files: src/sys/arch/powerpc/include: fenv.h Log Message: fesetexceptflag(): Set FE_ALL_INVALID instead of FE_ALL_EXCEPT for FE_INVALID. Taken from FreeBSD: https://cgit.freebsd.org/src/commit/lib/msun/powerpc/fenv.h?id=e7bd4f846f0c9185aebfd3d116bb78ab137280fa > [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 No regression for full ATF on both real and emulated FPU. XXX Import some tests from FreeBSD's lib/msun/tests. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/fenv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/include/fenv.h diff -u src/sys/arch/powerpc/include/fenv.h:1.6 src/sys/arch/powerpc/include/fenv.h:1.7 --- src/sys/arch/powerpc/include/fenv.h:1.6 Wed Oct 30 02:44:29 2019 +++ src/sys/arch/powerpc/include/fenv.h Tue Sep 13 01:22:12 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.6 2019/10/30 02:44:29 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.7 2022/09/13 01:22:12 rin Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz <d...@freebsd.org> @@ -177,7 +177,7 @@ fesetexceptflag(const fexcept_t *__flagp union __fpscr __r; if (__excepts & FE_INVALID) - __excepts |= FE_ALL_EXCEPT; + __excepts |= FE_ALL_INVALID; __mffs(&__r.__d); __r.__bits.__reg &= ~__excepts; __r.__bits.__reg |= *__flagp & __excepts;