aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-02 18:53:56 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-02 18:54:15 -0400
commite68fee39847712f9316628e6efe8daa8fc13a5a5 (patch)
tree5fc5296f9633d3bf7d3bb01f2431fd4e59172094 /doc
parent1823a5979ad444a59a05dfa381d1dc88348cbd74 (diff)
downloadzig-e68fee39847712f9316628e6efe8daa8fc13a5a5.tar.gz
zig-e68fee39847712f9316628e6efe8daa8fc13a5a5.zip
docs: add atomicrmw operations list
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index b5fe464c35..ac381e00b2 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -6330,6 +6330,22 @@ comptime {
TODO right now bool is not accepted. Also I think we could make non powers of 2 work fine, maybe
we can remove this restriction
</p>
+ <p>
+ Supported operations:
+ </p>
+ <ul>
+ <li>{#syntax#}.Xchg{#endsyntax#} - stores the operand unmodified.</li>
+ <li>{#syntax#}.Add{#endsyntax#} - for integers, twos complement wraparound addition.
+ Also supports {#link|Floats#}.</li>
+ <li>{#syntax#}.Sub{#endsyntax#} - for integers, twos complement wraparound subtraction.
+ Also supports {#link|Floats#}.</li>
+ <li>{#syntax#}.And{#endsyntax#} - bitwise and</li>
+ <li>{#syntax#}.Nand{#endsyntax#} - bitwise nand</li>
+ <li>{#syntax#}.Or{#endsyntax#} - bitwise or</li>
+ <li>{#syntax#}.Xor{#endsyntax#} - bitwise xor</li>
+ <li>{#syntax#}.Max{#endsyntax#} - stores the operand if it is larger. Supports integers and floats.</li>
+ <li>{#syntax#}.Min{#endsyntax#} - stores the operand if it is smaller. Supports integers and floats.</li>
+ </ul>
{#header_close#}
{#header_open|@bitCast#}
<pre>{#syntax#}@bitCast(comptime DestType: type, value: var) DestType{#endsyntax#}</pre>