diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2019-12-11 15:09:24 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2019-12-11 15:12:18 +0100 |
commit | f82996f8159981619ac7ed8a4c1838c2ad72ab61 (patch) | |
tree | 684c4c0fad4471c925d49b8772d60e35e9ca5de6 /sysdeps/s390/fpu | |
parent | 1ac9c1cf87216bf9f8ac4f7c9754d025d9f2c4ae (diff) | |
download | glibc-f82996f8159981619ac7ed8a4c1838c2ad72ab61.tar glibc-f82996f8159981619ac7ed8a4c1838c2ad72ab61.tar.gz glibc-f82996f8159981619ac7ed8a4c1838c2ad72ab61.tar.bz2 glibc-f82996f8159981619ac7ed8a4c1838c2ad72ab61.zip |
Use GCC builtins for round functions if desired.
This patch is using the corresponding GCC builtin for roundf, round,
roundl and roundf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.
This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used. The code of the generic
implementation is not changed.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/s390/fpu')
-rw-r--r-- | sysdeps/s390/fpu/math-use-builtins.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/s390/fpu/math-use-builtins.h b/sysdeps/s390/fpu/math-use-builtins.h index a39715c612..51cb9f91ab 100644 --- a/sysdeps/s390/fpu/math-use-builtins.h +++ b/sysdeps/s390/fpu/math-use-builtins.h @@ -46,18 +46,24 @@ # define USE_TRUNCF_BUILTIN 1 # define USE_TRUNCL_BUILTIN 1 +# define USE_ROUND_BUILTIN 1 +# define USE_ROUNDF_BUILTIN 1 +# define USE_ROUNDL_BUILTIN 1 + # if __GNUC_PREREQ (8, 0) # define USE_NEARBYINTF128_BUILTIN 1 # define USE_RINTF128_BUILTIN 1 # define USE_FLOORF128_BUILTIN 1 # define USE_CEILF128_BUILTIN 1 # define USE_TRUNCF128_BUILTIN 1 +# define USE_ROUNDF128_BUILTIN 1 # else # define USE_NEARBYINTF128_BUILTIN 0 # define USE_RINTF128_BUILTIN 0 # define USE_FLOORF128_BUILTIN 0 # define USE_CEILF128_BUILTIN 0 # define USE_TRUNCF128_BUILTIN 0 +# define USE_ROUNDF128_BUILTIN 0 # endif #else @@ -88,6 +94,11 @@ # define USE_TRUNCL_BUILTIN 0 # define USE_TRUNCF128_BUILTIN 0 +# define USE_ROUND_BUILTIN 0 +# define USE_ROUNDF_BUILTIN 0 +# define USE_ROUNDL_BUILTIN 0 +# define USE_ROUNDF128_BUILTIN 0 + #endif /* ! HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT */ #endif /* math-use-builtins.h */ |