promote_low_f32x4: Wasm SIMD-Umwandlungsanweisung
Die promote_low_f32x4 SIMD-Umwandlungsanweisung konvertiert die ersten beiden Lanes einer v128 f32x4-Wertdarstellung in eine f64x2-Wertdarstellung.
Probieren Sie es aus
(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-
Der Wertetyp, auf dem die Anweisung ausgeführt wird. Die folgenden
v128-Wertdarstellungen unterstützenpromote_low_f32x4:f64x2
promote_low_f32x4-
Die
promote_low_f32x4-Anweisung. Muss immer nach demvalue_typeund einem Punkt (.) eingefügt werden.
Typ
[input] -> [output]
Binäre Kodierung
| Anweisung | Binärformat | Beispieltext => binär |
|---|---|---|
f64x2.promote_low_f32x4 |
0xfd 95:u32 |
f64x2.promote_low_f32x4 => 0xfd 0x5f |