any_true: Wasm SIMD bitweise Anweisung
Die any_true SIMD bitweise Anweisung überprüft, ob ein v128 Eingabewert irgendwelche von null verschiedene Bits enthält.
Probieren Sie es aus
(module
(import "console" "log" (func $log (param i32)))
(func $main
v128.const f32x4 0 0 0 1.2
v128.any_true
call $log ;; log the result
)
(start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
Syntax
v128.any_true
v128.any_true-
Die
v128.any_trueAnweisung.
Typ
[input] -> [output]
input-
Die Interpretation des
v128Eingabewertes. Dies kann ein Ganzzahltyp (zum Beispieli16x8) oder ein Fließkommatyp (zum Beispielf32x4) sein. output-
Der Ausgabewert. Dies ist ein
i32Typ, der1ist, wenn derv128Eingabewert irgendwelche von null verschiedenen Bits enthält, oder0, wenn alle Bits0sind.
Binäre Codierung
| Anweisung | Binärformat | Beispieltext => binär |
|---|---|---|
v128.any_true |
0xfd 83:u32 |
v128.any_true => 0xfd 0x53 |
Spezifikationen
| Spezifikation |
|---|
| WebAssembly Core Specification> # vector-instructions%E2%91%A8> |