From fb71f8b7080627a73012abd5a98abd23ab4d4b94 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 16 Mar 2018 10:22:53 +0000 Subject: 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@ --- lib/libm/arch/aarch64/fenv.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'lib/libm/arch') 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 * 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); -- cgit v1.2.3