WebAssembly SIMD-specific bitwise instructions
WebAssembly SIMD-specific bitwise instructions.
Bitwise logic
all_true-
Tests whether all lanes of a
v128input value are non-zero. andnot-
Takes two
v128input values. It performs a bitwise AND on the first value and a second value equal to the result of performing a bitwise NOT on each byte of the second original value. It returns a newv128value containing the result. any_true-
Tests whether a
v128input value contains any non-zero bits. bitmask-
Inspects the most significant bit (MSB) — bit 7 — of each byte of a
v128value interpretation. This is the sign bit if the value is treated as signed. The instruction's output value is equal to all of those bits collected into a singlei32. bitselect-
Takes three
v128values as inputs — two inputs and a mask value — and returns a newv128value with each byte calculated using the formulaoutput = (input1 AND mask) OR (input2 AND NOT mask). not-
Performs a bitwise NOT on each byte of a
v128value and returns a newv128value containing the result.