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))
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
21 template<isa<x86> Arch = NATIVE_BASELINE> requires(Arch.has(x86_feature::adx))
22 constexpr std::uint8_t addcarryx(
23 std::uint8_t carry, std::uint64_t a, std::uint64_t b, std::uint64_t * result) noexcept;
24
25 template<isa<x86> Arch = NATIVE_BASELINE> requires(!Arch.has(x86_feature::adx))
26 consteval std::uint8_t addcarryx(
27 std::uint8_t carry, std::uint64_t a, std::uint64_t b, std::uint64_t * result) noexcept;
28}
29#endif
30
31export namespace native {
35 using ::native::addcarryx;
37}
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...