convert_i32x4_u: Wasm SIMD conversion instruction
The convert_i32x4_u SIMD conversion instruction converts the lanes of an unsigned v128 i32x4 value interpretation into an f32x4 value interpretation.
Try it
(module
(import "console" "log" (func $log (param f32)))
(func $main
v128.const i32x4 0x3 0x3a 0xa9 0xff
f32x4.convert_i32x4_u
f32x4.extract_lane 2
call $log ;; log the result
)
(start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
Syntax
value_type.convert_i32x4_u
value_type-
The type of value the instruction is being run on. The following
v128value interpretations supportconvert_i32x4_u:f32x4
convert_i32x4_u-
The
convert_i32x4_uinstruction. Must always be included after thevalue_typeand a period (.).
Type
[input] -> [output]
Binary encoding
| Instruction | Binary format | Example text => binary |
|---|---|---|
f32x4.convert_i32x4_u |
0xfd 251:u32 |
f32x4.convert_i32x4_u => 0xfd 0xfb 0x01 |