all_true: Wasm SIMD Bitweise Anweisung
Die all_true-SIMD-Bitweise-Anweisung prüft, ob alle Spuren eines v128-Eingabewertes ungleich null sind.
Probieren Sie es aus
(module
(import "console" "log" (func $log (param i32)))
(func $main
v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
i8x16.all_true
call $log ;; log the result
)
(start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
Syntax
value_type.all_true
value_type-
Der Typ des Wertes, auf dem die Anweisung ausgeführt wird. Die folgenden Typen unterstützen
all_true:i8x16i16x8i32x4i64x2
all_true-
Die
all_true-Anweisung. Muss immer nach demvalue_typeund einem Punkt (.) eingefügt werden.
Typ
[input] -> [output]
Binäre Kodierung
| Anweisung | Binärformat | Beispieltext => binär |
|---|---|---|
i8x16.all_true |
0xfd 99:u32 |
i8x16.all_true => 0xfd 0x63 |
i16x8.all_true |
0xfd 131:u32 |
i16x8.all_true => 0xfd 0x83 0x01 |
i32x4.all_true |
0xfd 163:u32 |
i32x4.all_true => 0xfd 0xa3 0x01 |
i64x2.all_true |
0xfd 195:u32 |
i64x2.all_true => 0xfd 0xc3 0x01 |
Spezifikationen
| Spezifikation |
|---|
| WebAssembly Core Specification> # vector-instructions%E2%91%A8> |