MDN / promote_low_f32x4: Wasm SIMD conversion instruction
MDN / promote_low_f32x4: Wasm SIMD conversion instruction
The promote_low_f32x4 SIMD conversion instruction converts the first two lanes of a v128 f32x4 value interpretation into an f64x2 value interpretation.
(module
(import "console" "log" (func $log (param f64)))
(func $main
v128.const f32x4 0x3 0x3a 0x4b 0x5a
f64x2.promote_low_f32x4
f64x2.extract_lane 1
call $log ;; log the result
)
(start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
Syntax
value_type.promote_low_f32x4
value_type: The type of value the instruction is being run on. The following
v128value interpretations supportpromote_low_f32x4:f64x2
promote_low_f32x4: The
promote_low_f32x4instruction. Must always be included after thevalue_typeand a period (.).
Type
[input] -> [output]
input: The input
v128f32x4value interpretation.
output: The output
v128f64x2value interpretation.
Binary encoding
InstructionBinary formatExample text => binaryf64x2.promote_low_f32x40xfd 95:u32f64x2.promote_low_f32x4 => 0xfd 0x5f