[7/8,RFC] Mention floating point atomic fetch_add etc in docs
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
fail
|
Build failed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
fail
|
Test failed
|
Commit Message
From: Matthew Malcomson <mmalcomson@nvidia.com>
Signed-off-by: Matthew Malcomson <mmalcomson@nvidia.com>
---
gcc/doc/extend.texi | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -13501,6 +13501,18 @@ 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 all
+accept floating point types of @code{float}, @code{double}, @code{long double},
+@code{bfloat16}, @code{_Float16}, @code{_Float32}, @code{_Float64},
+@code{_Float128}, @code{_Float32x} and @code{_Float64x}. These 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.
+The specialised versions of these functions are denoted by one of the
+suffixes @code{_fpf}, @code{_fp}, @code{_fpl}, @code{_fpf16b}, @code{_fpf16},
+@code{_fpf32}, @code{_fpf64}, @code{_fpf128}, @code{_fpf32x}, @code{_fpf64x}.
+
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