native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
native.x86.adx.ccm
1// SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0
2module;
3
4#include "native/isa_import.h"
5#include "native/x86/adx.h"
6#include "native/targets.h"
7
8export module native.x86.adx;
9export import native.x86.features;
10// Defaults belong to this module's provider; importer macros cannot change them.
11#if NATIVE_HOST_X86
12extern "C++" namespace native {
13 template<isa<x86> Arch = NATIVE_BASELINE> requires(Arch.has(x86_feature::adx))
14 constexpr std::uint8_t addcarryx(
15 std::uint8_t carry, std::uint32_t a, std::uint32_t b, std::uint32_t * result) noexcept;
16
17 template<isa<x86> Arch = NATIVE_BASELINE> requires(!Arch.has(x86_feature::adx) && !Arch.has(polyfill))
18 consteval std::uint8_t addcarryx(
19 std::uint8_t carry, std::uint32_t a, std::uint32_t b, std::uint32_t * result) noexcept;
20
22 template<isa<x86> Arch = NATIVE_BASELINE> requires(!Arch.has(x86_feature::adx) && Arch.has(polyfill))
23 constexpr std::uint8_t addcarryx(
24 std::uint8_t carry, std::uint32_t a, std::uint32_t b, std::uint32_t * result) noexcept;
25
26 template<isa<x86> Arch = NATIVE_BASELINE> requires(Arch.has(x86_feature::adx))
27 constexpr std::uint8_t addcarryx(
28 std::uint8_t carry, std::uint64_t a, std::uint64_t b, std::uint64_t * result) noexcept;
29
30 template<isa<x86> Arch = NATIVE_BASELINE> requires(!Arch.has(x86_feature::adx) && !Arch.has(polyfill))
31 consteval std::uint8_t addcarryx(
32 std::uint8_t carry, std::uint64_t a, std::uint64_t b, std::uint64_t * result) noexcept;
33
35 template<isa<x86> Arch = NATIVE_BASELINE> requires(!Arch.has(x86_feature::adx) && Arch.has(polyfill))
36 constexpr std::uint8_t addcarryx(
37 std::uint8_t carry, std::uint64_t a, std::uint64_t b, std::uint64_t * result) noexcept;
38}
39#endif
40
41export namespace native {
45 using ::native::addcarryx;
47}
constexpr std::uint8_t addcarryx(std::uint8_t carry, std::uint32_t a, std::uint32_t b, std::uint32_t *result) noexcept
Add 32-bit operands with carry, writing the modular result.
Definition adx.h:55
Architecture-tagged vectors, register packs and supporting value types. Native arithmetic follows its...
constexpr polyfill_t polyfill
Compose this permission with an ISA using A | polyfill. Used alone, it selects scalar emulation in th...
Definition isa.h:43