any_true: Wasm SIMD bitweise Anweisung
Die any_true SIMD Bitweise Anweisung prüft, ob ein v128 Eingabewert irgendwelche ungleich null 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
v128Eingabewerts. Dies kann ein ganzzahliger Typ sein (zum Beispieli16x8) oder ein Gleitkomma-Typ (zum Beispielf32x4). output-
Der Ausgabewert. Dies ist ein
i32Typ, der1ist, wenn derv128Eingabewert irgendwelche ungleich null Bits enthält, oder0, wenn alle Bits0sind.
Binärcodierung
| Anweisung | Binärformat | Beispiel Text => binär |
|---|---|---|
v128.any_true |
0xfd 83:u32 |
v128.any_true => 0xfd 0x53 |