diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-01-18 08:38:06 +0000 |
---|---|---|
committer | Sebastian Huber <sh@gcc.gnu.org> | 2019-01-18 08:38:06 +0000 |
commit | 2185e212e9d03f943a94351689df4ae5691d7f79 (patch) | |
tree | 6173991d31f0df78228d72a96e1b302f57217ec9 | |
parent | f6605c653c5544a24ab9d103e50371954f9cfe55 (diff) | |
download | gcc-2185e212e9d03f943a94351689df4ae5691d7f79.zip gcc-2185e212e9d03f943a94351689df4ae5691d7f79.tar.gz gcc-2185e212e9d03f943a94351689df4ae5691d7f79.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a18cf8..9018b8f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * doc/extend.texi (Built-in Functions for Memory Model Aware + Atomic Operations): Document atomic fetch and nand. + 2019-01-18 Martin Liska <mliska@suse.cz> Richard Biener <rguenther@suse.de> diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index ebd5648..95d22ac 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 |