native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
native.x86.bmi2 Module Reference

Exported Modules

module  native.x86.features

Functions

template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint32_t native::bzhi (std::uint32_t value, unsigned index) noexcept
 Zero bits at and above index's low eight bits; an index at least the width leaves value unchanged.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint32_t native::bzhi (std::uint32_t value, unsigned index) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint64_t native::bzhi (std::uint64_t value, unsigned index) noexcept
 BZHI with a 64-bit value and the same low-eight-bit index semantics.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint64_t native::bzhi (std::uint64_t value, unsigned index) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint32_t native::mulx (std::uint32_t a, std::uint32_t b, std::uint32_t *high) noexcept
 Return the low product and write the high product to a valid output pointer.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint32_t native::mulx (std::uint32_t a, std::uint32_t b, std::uint32_t *high) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint64_t native::mulx (std::uint64_t a, std::uint64_t b, std::uint64_t *high) noexcept
 Return the low 64 bits and write the high 64 bits of the unsigned 128-bit product.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint64_t native::mulx (std::uint64_t a, std::uint64_t b, std::uint64_t *high) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint32_t native::pdep (std::uint32_t value, std::uint32_t maskmask) noexcept
 Parallel bit deposit (PDEP): place the low popcount(mask) bits into mask's set positions, in order.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint32_t native::pdep (std::uint32_t value, std::uint32_t maskmask) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint64_t native::pdep (std::uint64_t value, std::uint64_t maskmask) noexcept
 Parallel bit deposit (PDEP), with 64-bit operands.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint64_t native::pdep (std::uint64_t value, std::uint64_t maskmask) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint32_t native::pext (std::uint32_t value, std::uint32_t maskmask) noexcept
 Parallel bit extract (PEXT): gather mask's selected bits into the low bits, in order.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint32_t native::pext (std::uint32_t value, std::uint32_t maskmask) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint64_t native::pext (std::uint64_t value, std::uint64_t maskmask) noexcept
 Parallel bit extract (PEXT), with 64-bit operands.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint64_t native::pext (std::uint64_t value, std::uint64_t maskmask) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint32_t native::shlx (std::uint32_t value, unsigned count) noexcept
 Logical left shift using the low five bits of count.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint32_t native::shlx (std::uint32_t value, unsigned count) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint64_t native::shlx (std::uint64_t value, unsigned count) noexcept
 Logical left shift using the low six bits of count.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint64_t native::shlx (std::uint64_t value, unsigned count) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint32_t native::shrx (std::uint32_t value, unsigned count) noexcept
 Logical right shift using the low five bits of count.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint32_t native::shrx (std::uint32_t value, unsigned count) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::uint64_t native::shrx (std::uint64_t value, unsigned count) noexcept
 Logical right shift using the low six bits of count.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::uint64_t native::shrx (std::uint64_t value, unsigned count) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::int32_t native::sarx (std::int32_t value, unsigned count) noexcept
 Arithmetic right shift using the low five bits of count, propagating the sign bit.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::int32_t native::sarx (std::int32_t value, unsigned count) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2))
constexpr std::int64_t native::sarx (std::int64_t value, unsigned count) noexcept
 Arithmetic right shift using the low six bits of count, propagating the sign bit.
template<isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2))
consteval std::int64_t native::sarx (std::int64_t value, unsigned count) noexcept
 Evaluate the same operation at compile time when Arch lacks the feature.
template<unsigned Imm8, isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2) && Imm8 <= 255)
constexpr std::uint32_t native::rorx (std::uint32_t value) noexcept
template<unsigned Imm8, isa< x86 > Arch = NATIVE_BASELINE>
requires (Arch.has(x86_feature::bmi2) && Imm8 <= 255)
constexpr std::uint64_t native::rorx (std::uint64_t value) noexcept
template<unsigned Imm8, isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2) && Imm8 <= 255)
consteval std::uint32_t native::rorx (std::uint32_t value) noexcept
 Rotate a constant expression when Arch lacks BMI2.
template<unsigned Imm8, isa< x86 > Arch = NATIVE_BASELINE>
requires (!Arch.has(x86_feature::bmi2) && Imm8 <= 255)
consteval std::uint64_t native::rorx (std::uint64_t value) noexcept
 Rotate a constant expression when Arch lacks BMI2.

Files

file  src/native.x86.bmi2.ccm