From: Sebastian Huber Date: Fri, 18 Jan 2019 08:38:06 +0000 (+0000) Subject: Document atomic fetch and nand X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2185e212e9d03f943a94351689df4ae5691d7f79;p=gcc.git Document atomic fetch and nand Copy code example for fetch and nand from "Legacy __sync Built-in Functions for Atomic Memory Access" to "Built-in Functions for Memory Model Aware Atomic Operations". gcc/ * doc/extend.texi (Built-in Functions for Memory Model Aware Atomic Operations): Document atomic fetch and nand. From-SVN: r268062 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a18cf80ee4..9018b8f0099 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-01-18 Sebastian Huber + + * doc/extend.texi (Built-in Functions for Memory Model Aware + Atomic Operations): Document atomic fetch and nand. + 2019-01-18 Martin Liska Richard Biener diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index ebd56489176..95d22ac1e3c 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -11017,6 +11017,7 @@ they are not scaled by the size of the type to which the pointer points. @smallexample @{ *ptr @var{op}= val; return *ptr; @} +@{ *ptr = ~(*ptr & val); return *ptr; @} // nand @end smallexample The object pointed to by the first argument must be of integer or pointer @@ -11038,6 +11039,7 @@ the type to which the pointer points. @smallexample @{ tmp = *ptr; *ptr @var{op}= val; return tmp; @} +@{ tmp = *ptr; *ptr = ~(*ptr & val); return tmp; @} // nand @end smallexample The same constraints on arguments apply as for the corresponding