summaryrefslogtreecommitdiff
path: root/lib/libm/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-03-16 10:22:53 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-03-16 10:22:53 +0000
commitfb71f8b7080627a73012abd5a98abd23ab4d4b94 (patch)
tree4e54126204e28dd3a22bfa2f7a127d530cc6bac1 /lib/libm/arch
parenta843b21bc54bc4704e11d9c13d611e0203528146 (diff)
Since most (if not all) ARMv8 hardware doesn't actually support trapping of
floating-point exceptions, simplify the functions that control the exception masks just like we did on armv7. ok tom@
Diffstat (limited to 'lib/libm/arch')
-rw-r--r--lib/libm/arch/aarch64/fenv.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/libm/arch/aarch64/fenv.c b/lib/libm/arch/aarch64/fenv.c
index 9d2bdaef3fa..88dc3d8ed30 100644
--- a/lib/libm/arch/aarch64/fenv.c
+++ b/lib/libm/arch/aarch64/fenv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fenv.c,v 1.1 2017/01/11 13:38:13 patrick Exp $ */
+/* $OpenBSD: fenv.c,v 1.2 2018/03/16 10:22:52 kettenis Exp $ */
/*-
* Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -252,33 +252,17 @@ DEF_STD(feupdateenv);
int
feenableexcept(int mask)
{
- fenv_t old_r, new_r;
-
- __mrs_fpcr(old_r);
- new_r = old_r | ((mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT);
- __msr_fpcr(new_r);
- return ((old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT);
+ return -1;
}
-DEF_STD(feenableexcept);
int
fedisableexcept(int mask)
{
- fenv_t old_r, new_r;
-
- __mrs_fpcr(old_r);
- new_r = old_r & ~((mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT);
- __msr_fpcr(new_r);
- return ((old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT);
+ return 0;
}
-DEF_STD(fedisableexcept);
int
fegetexcept(void)
{
- fenv_t r;
-
- __mrs_fpcr(r);
- return ((r & _ENABLE_MASK) >> _FPUSW_SHIFT);
+ return 0;
}
-DEF_STD(fegetexcept);