16 inline constexpr std::uint8_t wasm_simd128_probe[]{
17 0,97,115,109,1,0,0,0, 1,5,1,0x60,0,1,0x7b, 3,2,1,0,
18 10,22,1,20,0, 0xfd,0x0c,
19 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0b
21 inline constexpr std::uint8_t wasm_relaxed_simd_probe[]{
22 0,97,115,109,1,0,0,0, 1,7,1,0x60,2,0x7b,0x7b,1,0x7b, 3,2,1,0,
23 10,11,1,9,0, 0x20,0,0x20,1,0xfd,0x80,0x02,0x0b
33 case wasm_feature::simd128:
return detail::wasm_simd128_probe;
34 case wasm_feature::relaxed_simd:
return detail::wasm_relaxed_simd_probe;
68 result.
observed.
set(wasm_feature::simd128,raw.simd128_observed);
69 result.
present.
set(wasm_feature::simd128,raw.simd128_observed && raw.simd128);
70 result.
observed.
set(wasm_feature::relaxed_simd,raw.relaxed_simd_observed);
71 result.
present.
set(wasm_feature::relaxed_simd,raw.relaxed_simd_observed && raw.relaxed_simd);
81 template<
class V>
requires requires(V & validate,std::span<std::uint8_t const> bytes) {
82 { validate(bytes) }
noexcept -> std::same_as<std::optional<bool>>;
86 if(!baseline || !*baseline)
return {};
90 relaxed_simd.has_value(),relaxed_simd.value_or(
false)});
constexpr wasm_capabilities observe_wasm_capabilities(V &&validate) noexcept
constexpr std::span< std::uint8_t const > wasm_feature_probe(wasm_feature feature) noexcept
constexpr wasm_capabilities decode_wasm_capabilities(wasm_capabilities::raw_observations raw) noexcept
Architecture-tagged vectors, register packs and supporting value types. Native arithmetic follows its...
wasm_feature
WebAssembly validation capabilities, using local bit indices.
constexpr void set(feature_type f, bool value) noexcept
A structural set of one family's features, without prerequisite closure.
Embedder-supplied query results; an unobserved positive never authorizes code.
bool simd128
The runtime accepts standard SIMD128 instructions.
bool relaxed_simd_observed
True only after a relaxed-SIMD query completes with a boolean answer.
bool relaxed_simd
The runtime accepts the finalized relaxed-SIMD instruction set.
bool simd128_observed
True only after a SIMD128 query completes with a boolean answer.
isa< wasm > observed
Features whose observations completed, including negative answers.
isa< wasm > present
Features successfully observed as supported.
raw_observations raw
Diagnostic snapshot; editing it does not update present/observed.