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 () 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
 True when every bit in a same-family requirement is present.
constexpr bool valid () const noexcept
 True when no invalid marker or unregistered padding bit is set.
constexpr bool operator== (isa const &) const =default
 Compare every stored bit, including invalid requirements.

Public Attributes

std::array< std::uint64_t,(feature_count+1+63)/64 > flags {}
 Public structural bits; invalid enum values and padding fail validation.
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 280 of file isa.h.

Member Function Documentation

◆ 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 300 of file isa.h.

Here is the caller graph for this function:

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