Commit 2185e212 by Sebastian Huber Committed by Sebastian Huber

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
parent f6605c65
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> 2019-01-18 Martin Liska <mliska@suse.cz>
Richard Biener <rguenther@suse.de> Richard Biener <rguenther@suse.de>
......
...@@ -11017,6 +11017,7 @@ they are not scaled by the size of the type to which the pointer points. ...@@ -11017,6 +11017,7 @@ they are not scaled by the size of the type to which the pointer points.
@smallexample @smallexample
@{ *ptr @var{op}= val; return *ptr; @} @{ *ptr @var{op}= val; return *ptr; @}
@{ *ptr = ~(*ptr & val); return *ptr; @} // nand
@end smallexample @end smallexample
The object pointed to by the first argument must be of integer or pointer 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. ...@@ -11038,6 +11039,7 @@ the type to which the pointer points.
@smallexample @smallexample
@{ tmp = *ptr; *ptr @var{op}= val; return tmp; @} @{ tmp = *ptr; *ptr @var{op}= val; return tmp; @}
@{ tmp = *ptr; *ptr = ~(*ptr & val); return tmp; @} // nand
@end smallexample @end smallexample
The same constraints on arguments apply as for the corresponding The same constraints on arguments apply as for the corresponding
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment