MDN / WebAssembly SIMD conversion instructions
MDN / WebAssembly SIMD conversion instructions
WebAssembly SIMD conversion instructions.
Convert between types
: Converts the lanes of a
v128f64x2value interpretation into a signedi32x4value interpretation.
: Converts the lanes of a
v128f64x2value interpretation into an unsignedi32x4value interpretation.
: Converts the lanes of a
v128f32x4value interpretation into a signedi32x4value interpretation.
: Converts the lanes of a
v128f32x4value interpretation into an unsignedi32x4value interpretation.
: Converts the lanes of a
v128f64x2value interpretation into anf32x4value interpretation. The two higher lanes of the result are initialized to zero.
: Converts the first two lanes of a
v128f32x4value interpretation into anf64x2value interpretation.
Convert from narrower to wider type
: Converts lanes 8–15 of a signed
v128i8x16value interpretation into ani16x8value interpretation.
: Converts lanes 8–15 of an unsigned
v128i8x16value interpretation into ani16x8value interpretation.
: Converts lanes 4–7 of a signed
v128i16x8value interpretation into ani32x4value interpretation.
: Converts lanes 4–7 of an unsigned
v128i16x8value interpretation into ani32x4value interpretation.
: Converts lanes 2–3 of a signed
v128i32x4value interpretation into ani64x2value interpretation.
: Converts lanes 2–3 of an unsigned
v128i32x4value interpretation into ani64x2value interpretation.
: Converts lanes 0–7 of a signed
v128i8x16value interpretation into ani16x8value interpretation.
: Converts lanes 0–7 of an unsigned
v128i8x16value interpretation into ani16x8value interpretation.
: Converts lanes 0–3 of a signed
v128i16x8value interpretation into ani32x4value interpretation.
: Converts lanes 0–3 of an unsigned
v128i16x8value interpretation into ani32x4value interpretation.
: Converts lanes 0–1 of a signed
v128i32x4value interpretation into ani64x2value interpretation.
: Converts lanes 0–1 of an unsigned
v128i32x4value interpretation into ani64x2value interpretation.
Convert from wider to narrower type
: Converts two signed
v128i16x8value interpretations into ani8x16value interpretation.
: Converts two signed
v128i16x8value interpretations into ani8x16value interpretation using unsigned saturation.
: Converts two signed
v128i32x4value interpretations into ani16x8value interpretation.
: Converts two signed
v128i32x4value interpretations into ani16x8value interpretation using unsigned saturation.
Value replacement
: Replaces the specified lane of a
v128value interpretation with a new value and returns the resultingv128value interpretation.
: Returns a new
v128value interpretation with its lane values selected from two inputv128values, determined by provided index values.
: Copies the same value to all lanes of a
v128value interpretation.
: Returns a new
v128value interpretation with its lane values selected from an inputv128value, determined by indices provided in a second inputv128.
SIMD-specific trunc instructions
: Performs a saturating conversion of the lanes of a
v128f32x4value interpretation into a signedi32x4value interpretation, clamping the output to the range allowed by the value type.
: Performs a saturating conversion of the lanes of a
v128f32x4value interpretation into an unsignedi32x4value interpretation, clamping the output to the range allowed by the value type.
: Performs a saturating conversion of the lanes of a
v128f64x2value interpretation into a signedi32x4value interpretation, clamping the output to the range allowed by the value type. The two higher lanes of the result are initialized to zero.
: Performs a saturating conversion of the lanes of a
v128f64x2value interpretation into an unsignedi32x4value interpretation, clamping the output to the range allowed by the value type. The two higher lanes of the result are initialized to zero.
See also the non-SIMD-specific trunc instruction.