authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-02 18:53:56-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-02 18:54:15-04:00
loge68fee39847712f9316628e6efe8daa8fc13a5a5
tree5fc5296f9633d3bf7d3bb01f2431fd4e59172094
parent1823a5979ad444a59a05dfa381d1dc88348cbd74
signaturelock-open Commit is signed but in an unrecognized format.

docs: add atomicrmw operations list


1 files changed, 16 insertions(+), 0 deletions(-)

doc/langref.html.in+16
......@@ -6330,6 +6330,22 @@ comptime {
63306330 TODO right now bool is not accepted. Also I think we could make non powers of 2 work fine, maybe
63316331 we can remove this restriction
63326332 </p>
6333 <p>
6334 Supported operations:
6335 </p>
6336 <ul>
6337 <li>{#syntax#}.Xchg{#endsyntax#} - stores the operand unmodified.</li>
6338 <li>{#syntax#}.Add{#endsyntax#} - for integers, twos complement wraparound addition.
6339 Also supports {#link|Floats#}.</li>
6340 <li>{#syntax#}.Sub{#endsyntax#} - for integers, twos complement wraparound subtraction.
6341 Also supports {#link|Floats#}.</li>
6342 <li>{#syntax#}.And{#endsyntax#} - bitwise and</li>
6343 <li>{#syntax#}.Nand{#endsyntax#} - bitwise nand</li>
6344 <li>{#syntax#}.Or{#endsyntax#} - bitwise or</li>
6345 <li>{#syntax#}.Xor{#endsyntax#} - bitwise xor</li>
6346 <li>{#syntax#}.Max{#endsyntax#} - stores the operand if it is larger. Supports integers and floats.</li>
6347 <li>{#syntax#}.Min{#endsyntax#} - stores the operand if it is smaller. Supports integers and floats.</li>
6348 </ul>
63336349 {#header_close#}
63346350 {#header_open|@bitCast#}
63356351 <pre>{#syntax#}@bitCast(comptime DestType: type, value: var) DestType{#endsyntax#}</pre>