Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten. Erfahre mehr über dieses Experiment.

View in English Always switch to English

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_true Anweisung.

Typ

[input] -> [output]
input

Die Interpretation des v128 Eingabewertes. Dies kann ein Ganzzahltyp (zum Beispiel i16x8) oder ein Fließkommatyp (zum Beispiel f32x4) sein.

output

Der Ausgabewert. Dies ist ein i32 Typ, der 1 ist, wenn der v128 Eingabewert irgendwelche von null verschiedenen Bits enthält, oder 0, wenn alle Bits 0 sind.

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

Browser-Kompatibilität