native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
native::isa< wasm > Struct Reference

Exact WebAssembly feature requirements; construction does not add prerequisites. More...

#include <isa.h>

Public Types

using feature_type = typename detail::feature_traits<wasm>::type
 Feature enum accepted by this ISA family.

Public Member Functions

constexpr isa (polyfill_t) noexcept
 Construct an empty hardware requirement with emulation permitted.
constexpr bool has (polyfill_t) const noexcept
 True when semantic emulation or storage decomposition is permitted.
constexpr isa () noexcept=default
 Construct the empty requirement set.
constexpr isa (feature_type f) noexcept
 Require exactly one feature of this family, without prerequisite closure.
constexpr bool get (feature_type f) const noexcept
 Read one feature; out-of-range values are absent.
constexpr void set (feature_type f, bool value) noexcept
constexpr bool has (feature_type f) const noexcept
 True when the feature is present.
constexpr bool has (isa other) const noexcept
constexpr bool valid () const noexcept
 True when no invalid marker or unregistered padding bit is set.
constexpr bool operator== (isa const &) const =default
 Compare hardware bits and emulation permission, retaining NTTP identity.

Public Attributes

std::array< std::uint64_t,(feature_count+1+63)/64 > flags {}
 Public structural bits; invalid enum values and padding fail validation.
bool allow_polyfill =false
 Structural emulation permission; hardware feature tests do not read it.
bool simd128
 Read or update the simd128 feature bit through flags.
bool relaxed_simd
 Read or update the relaxed_simd feature bit through flags.

Static Public Attributes

static constexpr architecture family =wasm
 Architecture family, independent of the compiler target.
static constexpr auto feature_count =detail::feature_traits<wasm>::count
 Number of registered features in this family.

Detailed Description

Exact WebAssembly feature requirements; construction does not add prerequisites.

Definition at line 308 of file isa.h.

Member Function Documentation

◆ has()

bool native::isa< wasm >::has ( isa< wasm > other) const
inlineconstexprnoexcept

True when every hardware bit in a same-family requirement is present. Emulation permission is not an instruction requirement.

Definition at line 348 of file isa.h.

◆ set()

void native::isa< wasm >::set ( feature_type f,
bool value )
inlineconstexprnoexcept

Set or clear one feature. Requiring an invalid enum records an invalid set. Clearing an invalid enum does nothing; neither case indexes outside storage.

Definition at line 334 of file isa.h.

Here is the caller graph for this function:

The documentation for this struct was generated from the following file: