-
- Downloads
builtins: Add DFP signaling NaN built-in functions
Add built-in functions __builtin_nansd32, __builtin_nansd64 and __builtin_nansd128 to return signaling NaNs of decimal floating-point types, analogous to the functions already present for binary floating-point types. This patch, independent of <https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557136.html> (pending review), is in preparation for adding the <float.h> macros for such signaling NaNs that are in C2x, analogous to the macros for other types that are in that patch. Bootstrapped with no regressions for x86_64-pc-linux-gnu. Also ran the new tests for powerpc64le-linux-gnu to confirm they do work in the case (hardware DFP) where floating-point exceptions are supported for DFP. gcc/ 2020-11-06 Joseph Myers <joseph@codesourcery.com> * builtins.def (BUILT_IN_NANSD32, BUILT_IN_NANSD64) (BUILT_IN_NANSD128): New built-in functions. * fold-const-call.c (fold_const_call): Handle the new built-in functions. * doc/extend.texi (__builtin_nansd32, __builtin_nansd64) (__builtin_nansd128): Document. * doc/sourcebuild.texi (Effective-Target Keywords): Document fenv_exceptions_dfp. gcc/testsuite/ 2020-11-06 Joseph Myers <joseph@codesourcery.com> * lib/target-supports.exp (check_effective_target_fenv_exceptions_dfp): New. * gcc.dg/dfp/builtin-snan-1.c, gcc.dg/dfp/builtin-snan-2.c: New tests.
Showing
- gcc/builtins.def 3 additions, 0 deletionsgcc/builtins.def
- gcc/doc/extend.texi 12 additions, 0 deletionsgcc/doc/extend.texi
- gcc/doc/sourcebuild.texi 5 additions, 0 deletionsgcc/doc/sourcebuild.texi
- gcc/fold-const-call.c 3 additions, 0 deletionsgcc/fold-const-call.c
- gcc/testsuite/gcc.dg/dfp/builtin-snan-1.c 23 additions, 0 deletionsgcc/testsuite/gcc.dg/dfp/builtin-snan-1.c
- gcc/testsuite/gcc.dg/dfp/builtin-snan-2.c 44 additions, 0 deletionsgcc/testsuite/gcc.dg/dfp/builtin-snan-2.c
- gcc/testsuite/lib/target-supports.exp 38 additions, 0 deletionsgcc/testsuite/lib/target-supports.exp
Loading
Please register or sign in to comment