narrow_i16x8_s: Wasm SIMD Konvertierungsanweisung
Die narrow_i16x8_s SIMD-Konvertierungsanweisung konvertiert zwei signierte v128 i16x8 Wertinterpretationen in eine i8x16 Wertinterpretation.
Probieren Sie es aus
(module
(import "console" "log" (func $log (param i32)))
(func $main
v128.const i16x8 2 4 6 8 10 12 14 16
v128.const i16x8 18 20 22 24 26 28 30 32
i8x16.narrow_i16x8_s
i8x16.extract_lane_s 15
call $log ;; log the result
)
(start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
Syntax
i8x16.narrow_i16x8_s
i8x16.narrow_i16x8_s-
Die
i8x16.narrow_i16x8_sAnweisung.
Typ
[input1, input2] -> [output]
Binäre Codierung
| Anweisung | Binärformat | Beispieltext => binär |
|---|---|---|
i8x16.narrow_i16x8_s |
0xfd 101:u32 |
i8x16.narrow_i16x8_s => 0xfd 0x65 |