diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2022-09-01 22:49:49 +0200 |
---|---|---|
committer | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2023-07-20 10:48:17 +0200 |
commit | 34cf27a64e7af949538e65bc266963c24f8da458 (patch) | |
tree | 2b6a08c8d6cd5973424ec90803599a20e8286423 /gcc/doc | |
parent | bb42f05d0738bddc721e838ebe9993df39ff2e0f (diff) | |
download | gcc-34cf27a64e7af949538e65bc266963c24f8da458.zip gcc-34cf27a64e7af949538e65bc266963c24f8da458.tar.gz gcc-34cf27a64e7af949538e65bc266963c24f8da458.tar.bz2 |
Add __builtin_iseqsig()
iseqsig() is a C2x library function, for signaling floating-point
equality checks. Provide a GCC-builtin for it, which is folded to
a series of comparisons.
2022-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR middle-end/77928
gcc/
* doc/extend.texi: Document iseqsig builtin.
* builtins.cc (fold_builtin_iseqsig): New function.
(fold_builtin_2): Handle BUILT_IN_ISEQSIG.
(is_inexpensive_builtin): Handle BUILT_IN_ISEQSIG.
* builtins.def (BUILT_IN_ISEQSIG): New built-in.
gcc/c-family/
* c-common.cc (check_builtin_function_arguments):
Handle BUILT_IN_ISEQSIG.
gcc/testsuite/
* gcc.dg/torture/builtin-iseqsig-1.c: New test.
* gcc.dg/torture/builtin-iseqsig-2.c: New test.
* gcc.dg/torture/builtin-iseqsig-3.c: New test.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index ec9ffa3..97eaacf 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -13187,6 +13187,7 @@ is called and the @var{flag} argument passed to it. @node Other Builtins @section Other Built-in Functions Provided by GCC @cindex built-in functions +@findex __builtin_iseqsig @findex __builtin_isfinite @findex __builtin_isnormal @findex __builtin_isgreater @@ -13738,9 +13739,9 @@ the same names as the standard macros ( @code{isgreater}, @code{islessgreater}, and @code{isunordered}) , with @code{__builtin_} prefixed. We intend for a library implementor to be able to simply @code{#define} each standard macro to its built-in equivalent. -In the same fashion, GCC provides @code{fpclassify}, @code{isfinite}, -@code{isinf_sign}, @code{isnormal} and @code{signbit} built-ins used with -@code{__builtin_} prefixed. The @code{isinf} and @code{isnan} +In the same fashion, GCC provides @code{fpclassify}, @code{iseqsig}, +@code{isfinite}, @code{isinf_sign}, @code{isnormal} and @code{signbit} built-ins +used with @code{__builtin_} prefixed. The @code{isinf} and @code{isnan} built-in functions appear both with and without the @code{__builtin_} prefix. With @code{-ffinite-math-only} option the @code{isinf} and @code{isnan} built-in functions will always return 0. |