From: Matthew Malcomson <[email protected]>
Do not mention suffixed versions since integral suffixed versions are
not mentioned in existing docs.
gcc/ChangeLog:
* doc/extend.texi: Document ability to use floating point atomic
fetch_add/fetch_sub/add_fetch/sub_fetch builtins.
Signed-off-by: Matthew Malcomson <[email protected]>
---
gcc/doc/extend.texi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index c566474074d..f235ca6e60a 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -13704,6 +13704,16 @@ the same format with the addition of a @samp{size_t}
parameter inserted
as the first parameter indicating the size of the object being pointed to.
All objects must be the same size.
+Moreover, the @samp{__atomic_fetch_add}, @samp{__atomic_fetch_sub},
+@samp{__atomic_add_fetch} and @samp{__atomic_sub_fetch} builtins can accept
+floating point types of @code{float}, @code{double}, @code{long double}. They
+can handle @code{bfloat16}, @code{_Float16}, @code{_Float32}, @code{_Float64},
+@code{_Float128}, @code{_Float32x} and @code{_Float64x} types if these are
+supported by the architecture. These functions use a lock-free built-in
+function if the size of the floating point type makes that possible and
+otherwise leave an external call to be resolved at run time. This external
+call is of the same format but specialised to the given floating point type.
+
There are 6 different memory orders that can be specified. These map
to the C++11 memory orders with the same names, see the C++11 standard
or the @uref{https://gcc.gnu.org/wiki/Atomic/GCCMM/AtomicSync,GCC wiki
--
2.43.0