native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
BMI1
Collaboration diagram for BMI1:

Functions

template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::andn (std::uint32_t first, std::uint32_t second) noexcept
 ANDN: complement the first operand, then AND with the second.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::andn (std::uint64_t first, std::uint64_t second) noexcept
 ANDN, with 64-bit operands.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::bextr (std::uint32_t value, std::uint32_t control) noexcept
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::bextr (std::uint64_t value, std::uint32_t control) noexcept
 BEXTR, with a 64-bit value and the same packed control format.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::bextr (std::uint32_t value, unsigned start, unsigned length) noexcept
 BEXTR with separate controls; only the low eight bits of each are used.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::bextr (std::uint64_t value, unsigned start, unsigned length) noexcept
 BEXTR with a 64-bit value and separate low-eight-bit controls.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::blsi (std::uint32_t value) noexcept
 BLSI: retain only the lowest set bit; zero remains zero.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::blsi (std::uint64_t value) noexcept
 BLSI, with a 64-bit operand.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::blsmsk (std::uint32_t value) noexcept
 BLSMSK: set every bit through the lowest set bit; zero produces all ones.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::blsmsk (std::uint64_t value) noexcept
 BLSMSK, with a 64-bit operand.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::blsr (std::uint32_t value) noexcept
 BLSR: clear the lowest set bit; zero remains zero.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::blsr (std::uint64_t value) noexcept
 BLSR, with a 64-bit operand.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint16_t native::tzcnt (std::uint16_t value) noexcept
 TZCNT: count low zero bits; zero returns the operand width, including 16-bit operands.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint32_t native::tzcnt (std::uint32_t value) noexcept
 TZCNT, with a 32-bit operand and result; zero returns 32.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
constexpr std::uint64_t native::tzcnt (std::uint64_t value) noexcept
 TZCNT, with a 64-bit operand and result; zero returns 64.

Detailed Description

Integer bit operations; runtime calls require x86_feature::bmi1 and target "bmi". Constant evaluation supports every x86 Arch; weak tags select consteval overloads.

Function Documentation

◆ bextr()

template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi1))
std::uint32_t native::bextr ( std::uint32_t value,
std::uint32_t control )
inlineconstexprexportnoexcept

BEXTR: control[7:0] is start; control[15:8] is length; higher bits are ignored. Extraction stops at the operand width; an out-of-range start or zero length yields zero.

Definition at line 56 of file bmi1.h.

Here is the caller graph for this function: