summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2021-05-11 12:05:14 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2021-05-11 12:05:14 +0000
commitd0739e7b535a9c16b46e25408ee8b3ca9e797567 (patch)
treecf89b0c39ab3672f4132a89b6364e51109180ebf
parentbb6254b76889e6f6318d09cd3ce911ee5e384c4d (diff)
use FE_ALL_EXCEPT not _ROUND_MASK when masking fcsr exception bits
-rw-r--r--lib/libm/arch/riscv64/fenv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libm/arch/riscv64/fenv.c b/lib/libm/arch/riscv64/fenv.c
index 635cb0eab50..56b9545f23b 100644
--- a/lib/libm/arch/riscv64/fenv.c
+++ b/lib/libm/arch/riscv64/fenv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fenv.c,v 1.1 2021/04/27 00:31:34 drahn Exp $ */
+/* $OpenBSD: fenv.c,v 1.2 2021/05/11 12:05:13 jsg Exp $ */
/*-
* Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -196,7 +196,7 @@ feholdexcept(fenv_t *envp)
__get_fcsr(r);
*envp = r;
- r &= ~_ROUND_MASK;
+ r &= ~FE_ALL_EXCEPT;
__set_fcsr(r);
return (0);