8#ifndef BOTAN_SIMD_4X32_H_
9#define BOTAN_SIMD_4X32_H_
11#include <botan/compiler.h>
12#include <botan/types.h>
13#include <botan/internal/isa_extn.h>
14#include <botan/internal/target_info.h>
17#if defined(BOTAN_TARGET_ARCH_SUPPORTS_SSSE3)
18 #include <emmintrin.h>
19 #include <tmmintrin.h>
20 #define BOTAN_SIMD_USE_SSSE3
22#elif defined(BOTAN_TARGET_ARCH_SUPPORTS_ALTIVEC)
23 #include <botan/internal/loadstor.h>
27 #define BOTAN_SIMD_USE_ALTIVEC
29 #define BOTAN_SIMD_USE_VSX
32#elif defined(BOTAN_TARGET_ARCH_SUPPORTS_NEON)
35 #define BOTAN_SIMD_USE_NEON
37#elif defined(BOTAN_TARGET_ARCH_SUPPORTS_LSX)
38 #include <lsxintrin.h>
39 #define BOTAN_SIMD_USE_LSX
42 #error "No SIMD instruction set enabled"
47#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX)
48using native_simd_type = __m128i;
49#elif defined(BOTAN_SIMD_USE_ALTIVEC)
50using native_simd_type = __vector
unsigned int;
51#elif defined(BOTAN_SIMD_USE_NEON)
52using native_simd_type = uint32x4_t;
82#if defined(BOTAN_SIMD_USE_SSSE3)
83 m_simd = _mm_setzero_si128();
84#elif defined(BOTAN_SIMD_USE_ALTIVEC)
85 m_simd = vec_splat_u32(0);
86#elif defined(BOTAN_SIMD_USE_NEON)
87 m_simd = vdupq_n_u32(0);
88#elif defined(BOTAN_SIMD_USE_LSX)
89 m_simd = __lsx_vldi(0);
96 SIMD_4x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3)
noexcept {
97#if defined(BOTAN_SIMD_USE_SSSE3)
98 m_simd = _mm_set_epi32(B3, B2, B1, B0);
99#elif defined(BOTAN_SIMD_USE_ALTIVEC)
100 __vector
unsigned int val = {B0, B1, B2, B3};
102#elif defined(BOTAN_SIMD_USE_NEON)
104 const uint32_t B[4] = {B0, B1, B2, B3};
105 m_simd = vld1q_u32(B);
106#elif defined(BOTAN_SIMD_USE_LSX)
108 const uint32_t B[4] = {B0, B1, B2, B3};
109 m_simd = __lsx_vld(B, 0);
119#if defined(BOTAN_SIMD_USE_SSSE3)
121#elif defined(BOTAN_SIMD_USE_NEON)
123#elif defined(BOTAN_SIMD_USE_LSX)
134#if defined(BOTAN_SIMD_USE_SSSE3)
136#elif defined(BOTAN_SIMD_USE_NEON)
137 return SIMD_4x32(vreinterpretq_u32_u8(vdupq_n_u8(B)));
138#elif defined(BOTAN_SIMD_USE_LSX)
150#if defined(BOTAN_SIMD_USE_SSSE3)
151 return SIMD_4x32(_mm_loadu_si128(
reinterpret_cast<const __m128i*
>(in)));
152#elif defined(BOTAN_SIMD_USE_ALTIVEC)
157 __vector
unsigned int val = {R0, R1, R2, R3};
159#elif defined(BOTAN_SIMD_USE_NEON)
160 SIMD_4x32 l(vld1q_u32(
static_cast<const uint32_t*
>(in)));
161 if constexpr(std::endian::native == std::endian::big) {
166#elif defined(BOTAN_SIMD_USE_LSX)
175#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX)
178#elif defined(BOTAN_SIMD_USE_ALTIVEC)
183 __vector
unsigned int val = {R0, R1, R2, R3};
186#elif defined(BOTAN_SIMD_USE_NEON)
187 SIMD_4x32 l(vld1q_u32(
static_cast<const uint32_t*
>(in)));
188 if constexpr(std::endian::native == std::endian::little) {
200 void store_le(uint32_t out[4])
const noexcept { this->
store_le(
reinterpret_cast<uint8_t*
>(out)); }
202 void store_be(uint32_t out[4])
const noexcept { this->
store_be(
reinterpret_cast<uint8_t*
>(out)); }
204 void store_le(uint64_t out[2])
const noexcept { this->
store_le(
reinterpret_cast<uint8_t*
>(out)); }
210#if defined(BOTAN_SIMD_USE_SSSE3)
212 _mm_storeu_si128(
reinterpret_cast<__m128i*
>(out),
raw());
214#elif defined(BOTAN_SIMD_USE_ALTIVEC)
217 __vector
unsigned int V;
226#elif defined(BOTAN_SIMD_USE_NEON)
227 if constexpr(std::endian::native == std::endian::little) {
228 vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
230 vst1q_u8(out, vreinterpretq_u8_u32(
bswap().m_simd));
232#elif defined(BOTAN_SIMD_USE_LSX)
233 __lsx_vst(
raw(), out, 0);
240 BOTAN_FN_ISA_SIMD_4X32
void store_be(uint8_t out[])
const noexcept {
241#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX)
245#elif defined(BOTAN_SIMD_USE_ALTIVEC)
248 __vector
unsigned int V;
257#elif defined(BOTAN_SIMD_USE_NEON)
258 if constexpr(std::endian::native == std::endian::little) {
259 vst1q_u8(out, vreinterpretq_u8_u32(
bswap().m_simd));
261 vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
274#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_crypto_vshasigmaw) && defined(_ARCH_PWR8)
275 return SIMD_4x32(__builtin_crypto_vshasigmaw(
raw(), 1, 0));
280 return (rot1 ^ rot2 ^ rot3);
288#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_crypto_vshasigmaw) && defined(_ARCH_PWR8)
289 return SIMD_4x32(__builtin_crypto_vshasigmaw(
raw(), 1, 0xF));
294 return (rot1 ^ rot2 ^ rot3);
301 template <
size_t ROT>
303 requires(ROT > 0 && ROT < 32)
305#if defined(BOTAN_SIMD_USE_SSSE3)
306 if constexpr(ROT == 8) {
307 const auto shuf_rotl_8 = _mm_set_epi64x(0x0e0d0c0f0a09080b, 0x0605040702010003);
309 }
else if constexpr(ROT == 16) {
310 const auto shuf_rotl_16 = _mm_set_epi64x(0x0d0c0f0e09080b0a, 0x0504070601000302);
311 return SIMD_4x32(_mm_shuffle_epi8(
raw(), shuf_rotl_16));
312 }
else if constexpr(ROT == 24) {
313 const auto shuf_rotl_24 = _mm_set_epi64x(0x0c0f0e0d080b0a09, 0x0407060500030201);
314 return SIMD_4x32(_mm_shuffle_epi8(
raw(), shuf_rotl_24));
316 return SIMD_4x32(_mm_or_si128(_mm_slli_epi32(
raw(),
static_cast<int>(ROT)),
317 _mm_srli_epi32(
raw(),
static_cast<int>(32 - ROT))));
320#elif defined(BOTAN_SIMD_USE_ALTIVEC)
322 const unsigned int r =
static_cast<unsigned int>(ROT);
323 __vector
unsigned int rot = {r, r, r, r};
326#elif defined(BOTAN_SIMD_USE_NEON)
328 #if defined(BOTAN_TARGET_ARCH_IS_ARM64)
330 if constexpr(ROT == 8) {
331 const uint8_t maskb[16] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14};
332 const uint8x16_t mask = vld1q_u8(maskb);
333 return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(m_simd), mask)));
334 }
else if constexpr(ROT == 16) {
335 return SIMD_4x32(vreinterpretq_u32_u16(vrev32q_u16(vreinterpretq_u16_u32(m_simd))));
339 vorrq_u32(vshlq_n_u32(m_simd,
static_cast<int>(ROT)), vshrq_n_u32(m_simd,
static_cast<int>(32 - ROT))));
340#elif defined(BOTAN_SIMD_USE_LSX)
348 template <
size_t ROT>
350 return this->
rotl<32 - ROT>();
399#if defined(BOTAN_SIMD_USE_SSSE3)
400 m_simd = _mm_add_epi32(m_simd, other.m_simd);
401#elif defined(BOTAN_SIMD_USE_ALTIVEC)
402 m_simd = vec_add(m_simd, other.m_simd);
403#elif defined(BOTAN_SIMD_USE_NEON)
404 m_simd = vaddq_u32(m_simd, other.m_simd);
405#elif defined(BOTAN_SIMD_USE_LSX)
406 m_simd = __lsx_vadd_w(m_simd, other.m_simd);
411#if defined(BOTAN_SIMD_USE_SSSE3)
412 m_simd = _mm_sub_epi32(m_simd, other.m_simd);
413#elif defined(BOTAN_SIMD_USE_ALTIVEC)
414 m_simd = vec_sub(m_simd, other.m_simd);
415#elif defined(BOTAN_SIMD_USE_NEON)
416 m_simd = vsubq_u32(m_simd, other.m_simd);
417#elif defined(BOTAN_SIMD_USE_LSX)
418 m_simd = __lsx_vsub_w(m_simd, other.m_simd);
423#if defined(BOTAN_SIMD_USE_SSSE3)
424 m_simd = _mm_xor_si128(m_simd, other.m_simd);
425#elif defined(BOTAN_SIMD_USE_ALTIVEC)
426 m_simd = vec_xor(m_simd, other.m_simd);
427#elif defined(BOTAN_SIMD_USE_NEON)
428 m_simd = veorq_u32(m_simd, other.m_simd);
429#elif defined(BOTAN_SIMD_USE_LSX)
430 m_simd = __lsx_vxor_v(m_simd, other.m_simd);
437#if defined(BOTAN_SIMD_USE_SSSE3)
438 m_simd = _mm_or_si128(m_simd, other.m_simd);
439#elif defined(BOTAN_SIMD_USE_ALTIVEC)
440 m_simd = vec_or(m_simd, other.m_simd);
441#elif defined(BOTAN_SIMD_USE_NEON)
442 m_simd = vorrq_u32(m_simd, other.m_simd);
443#elif defined(BOTAN_SIMD_USE_LSX)
444 m_simd = __lsx_vor_v(m_simd, other.m_simd);
449#if defined(BOTAN_SIMD_USE_SSSE3)
450 m_simd = _mm_and_si128(m_simd, other.m_simd);
451#elif defined(BOTAN_SIMD_USE_ALTIVEC)
452 m_simd = vec_and(m_simd, other.m_simd);
453#elif defined(BOTAN_SIMD_USE_NEON)
454 m_simd = vandq_u32(m_simd, other.m_simd);
455#elif defined(BOTAN_SIMD_USE_LSX)
456 m_simd = __lsx_vand_v(m_simd, other.m_simd);
462 requires(SHIFT > 0 && SHIFT < 32)
464#if defined(BOTAN_SIMD_USE_SSSE3)
465 return SIMD_4x32(_mm_slli_epi32(m_simd, SHIFT));
467#elif defined(BOTAN_SIMD_USE_ALTIVEC)
468 const unsigned int s =
static_cast<unsigned int>(SHIFT);
469 const __vector
unsigned int shifts = {s, s, s, s};
470 return SIMD_4x32(vec_sl(m_simd, shifts));
471#elif defined(BOTAN_SIMD_USE_NEON)
472 return SIMD_4x32(vshlq_n_u32(m_simd, SHIFT));
473#elif defined(BOTAN_SIMD_USE_LSX)
474 return SIMD_4x32(__lsx_vslli_w(m_simd, SHIFT));
480#if defined(BOTAN_SIMD_USE_SSSE3)
481 return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
483#elif defined(BOTAN_SIMD_USE_ALTIVEC)
484 const unsigned int s =
static_cast<unsigned int>(SHIFT);
485 const __vector
unsigned int shifts = {s, s, s, s};
486 return SIMD_4x32(vec_sr(m_simd, shifts));
487#elif defined(BOTAN_SIMD_USE_NEON)
488 return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
489#elif defined(BOTAN_SIMD_USE_LSX)
490 return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
495#if defined(BOTAN_SIMD_USE_SSSE3)
496 return SIMD_4x32(_mm_xor_si128(m_simd, _mm_set1_epi32(0xFFFFFFFF)));
497#elif defined(BOTAN_SIMD_USE_ALTIVEC)
498 return SIMD_4x32(vec_nor(m_simd, m_simd));
499#elif defined(BOTAN_SIMD_USE_NEON)
501#elif defined(BOTAN_SIMD_USE_LSX)
502 return SIMD_4x32(__lsx_vnor_v(m_simd, m_simd));
508#if defined(BOTAN_SIMD_USE_SSSE3)
509 return SIMD_4x32(_mm_andnot_si128(m_simd, other.m_simd));
510#elif defined(BOTAN_SIMD_USE_ALTIVEC)
515 return SIMD_4x32(vec_andc(other.m_simd, m_simd));
516#elif defined(BOTAN_SIMD_USE_NEON)
518 return SIMD_4x32(vbicq_u32(other.m_simd, m_simd));
519#elif defined(BOTAN_SIMD_USE_LSX)
521 return SIMD_4x32(__lsx_vandn_v(m_simd, other.m_simd));
529#if defined(BOTAN_SIMD_USE_SSSE3)
530 const auto idx = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
533#elif defined(BOTAN_SIMD_USE_ALTIVEC)
534 #ifdef BOTAN_SIMD_USE_VSX
537 const __vector
unsigned char rev[1] = {
538 {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12},
541 return SIMD_4x32(vec_perm(m_simd, m_simd, rev[0]));
544#elif defined(BOTAN_SIMD_USE_NEON)
545 return SIMD_4x32(vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(m_simd))));
546#elif defined(BOTAN_SIMD_USE_LSX)
547 return SIMD_4x32(__lsx_vshuf4i_b(m_simd, 0b00011011));
555#if defined(BOTAN_SIMD_USE_SSSE3)
557#elif defined(BOTAN_SIMD_USE_NEON)
558 return SIMD_4x32(vextq_u32(vdupq_n_u32(0),
raw(), 4 - I));
559#elif defined(BOTAN_SIMD_USE_ALTIVEC)
560 const __vector
unsigned int zero = vec_splat_u32(0);
562 const __vector
unsigned char shuf[3] = {
563 {16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
564 {16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7},
565 {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 1, 2, 3},
569#elif defined(BOTAN_SIMD_USE_LSX)
578#if defined(BOTAN_SIMD_USE_SSSE3)
580#elif defined(BOTAN_SIMD_USE_NEON)
582#elif defined(BOTAN_SIMD_USE_ALTIVEC)
583 const __vector
unsigned int zero = vec_splat_u32(0);
585 const __vector
unsigned char shuf[3] = {
586 {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
587 {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
588 {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
592#elif defined(BOTAN_SIMD_USE_LSX)
601#if defined(BOTAN_SIMD_USE_SSSE3)
602 const __m128i T0 = _mm_unpacklo_epi32(B0.m_simd, B1.m_simd);
603 const __m128i T1 = _mm_unpacklo_epi32(B2.m_simd, B3.m_simd);
604 const __m128i T2 = _mm_unpackhi_epi32(B0.m_simd, B1.m_simd);
605 const __m128i T3 = _mm_unpackhi_epi32(B2.m_simd, B3.m_simd);
607 B0.m_simd = _mm_unpacklo_epi64(T0, T1);
608 B1.m_simd = _mm_unpackhi_epi64(T0, T1);
609 B2.m_simd = _mm_unpacklo_epi64(T2, T3);
610 B3.m_simd = _mm_unpackhi_epi64(T2, T3);
611#elif defined(BOTAN_SIMD_USE_ALTIVEC)
612 const __vector
unsigned int T0 = vec_mergeh(B0.m_simd, B2.m_simd);
613 const __vector
unsigned int T1 = vec_mergeh(B1.m_simd, B3.m_simd);
614 const __vector
unsigned int T2 = vec_mergel(B0.m_simd, B2.m_simd);
615 const __vector
unsigned int T3 = vec_mergel(B1.m_simd, B3.m_simd);
617 B0.m_simd = vec_mergeh(T0, T1);
618 B1.m_simd = vec_mergel(T0, T1);
619 B2.m_simd = vec_mergeh(T2, T3);
620 B3.m_simd = vec_mergel(T2, T3);
622#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM32)
623 const uint32x4x2_t T0 = vzipq_u32(B0.m_simd, B2.m_simd);
624 const uint32x4x2_t T1 = vzipq_u32(B1.m_simd, B3.m_simd);
625 const uint32x4x2_t O0 = vzipq_u32(T0.val[0], T1.val[0]);
626 const uint32x4x2_t O1 = vzipq_u32(T0.val[1], T1.val[1]);
628 B0.m_simd = O0.val[0];
629 B1.m_simd = O0.val[1];
630 B2.m_simd = O1.val[0];
631 B3.m_simd = O1.val[1];
633#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
634 const uint32x4_t T0 = vzip1q_u32(B0.m_simd, B2.m_simd);
635 const uint32x4_t T2 = vzip2q_u32(B0.m_simd, B2.m_simd);
636 const uint32x4_t T1 = vzip1q_u32(B1.m_simd, B3.m_simd);
637 const uint32x4_t T3 = vzip2q_u32(B1.m_simd, B3.m_simd);
639 B0.m_simd = vzip1q_u32(T0, T1);
640 B1.m_simd = vzip2q_u32(T0, T1);
641 B2.m_simd = vzip1q_u32(T2, T3);
642 B3.m_simd = vzip2q_u32(T2, T3);
643#elif defined(BOTAN_SIMD_USE_LSX)
644 const __m128i T0 = __lsx_vilvl_w(B2.raw(), B0.raw());
645 const __m128i T1 = __lsx_vilvh_w(B2.raw(), B0.raw());
646 const __m128i T2 = __lsx_vilvl_w(B3.raw(), B1.raw());
647 const __m128i T3 = __lsx_vilvh_w(B3.raw(), B1.raw());
648 B0.m_simd = __lsx_vilvl_w(T2, T0);
649 B1.m_simd = __lsx_vilvh_w(T2, T0);
650 B2.m_simd = __lsx_vilvl_w(T3, T1);
651 B3.m_simd = __lsx_vilvh_w(T3, T1);
656#if defined(BOTAN_SIMD_USE_ALTIVEC)
657 return SIMD_4x32(vec_sel(b.raw(), a.raw(), mask.raw()));
658#elif defined(BOTAN_SIMD_USE_NEON)
659 return SIMD_4x32(vbslq_u32(mask.raw(), a.raw(), b.raw()));
660#elif defined(BOTAN_SIMD_USE_LSX)
661 return SIMD_4x32(__lsx_vbitsel_v(b.raw(), a.raw(), mask.raw()));
663 return (mask & a) ^ mask.andc(b);
678#if defined(BOTAN_SIMD_USE_SSSE3)
680#elif defined(BOTAN_SIMD_USE_NEON)
681 const uint8x16_t tbl8 = vreinterpretq_u8_u32(tbl.
raw());
682 const uint8x16_t idx8 = vreinterpretq_u8_u32(idx.
raw());
684 #if defined(BOTAN_TARGET_ARCH_IS_ARM32)
685 const uint8x8x2_t tbl2 = {vget_low_u8(tbl8), vget_high_u8(tbl8)};
688 vreinterpretq_u32_u8(vcombine_u8(vtbl2_u8(tbl2, vget_low_u8(idx8)), vtbl2_u8(tbl2, vget_high_u8(idx8)))));
690 return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(tbl8, idx8)));
693#elif defined(BOTAN_SIMD_USE_ALTIVEC)
694 const auto r = vec_perm(
reinterpret_cast<__vector
signed char>(tbl.
raw()),
695 reinterpret_cast<__vector
signed char>(tbl.
raw()),
696 reinterpret_cast<__vector
unsigned char>(idx.
raw()));
697 return SIMD_4x32(
reinterpret_cast<__vector
unsigned int>(r));
698#elif defined(BOTAN_SIMD_USE_LSX)
713#if defined(BOTAN_SIMD_USE_ALTIVEC)
714 const auto zero = vec_splat_s8(0x00);
715 const auto mask = vec_cmplt(
reinterpret_cast<__vector
signed char>(idx.
raw()), zero);
716 const auto r = vec_perm(
reinterpret_cast<__vector
signed char>(tbl.
raw()),
717 reinterpret_cast<__vector
signed char>(tbl.
raw()),
718 reinterpret_cast<__vector
unsigned char>(idx.
raw()));
719 return SIMD_4x32(
reinterpret_cast<__vector
unsigned int>(vec_sel(r, zero, mask)));
720#elif defined(BOTAN_SIMD_USE_LSX)
731 const auto zero = __lsx_vldi(0);
732 const auto r = __lsx_vshuf_b(zero, tbl.
raw(), idx.
raw());
733 const auto mask = __lsx_vslti_bu(idx.
raw(), 16);
734 return SIMD_4x32(__lsx_vbitsel_v(zero, r, mask));
742#if defined(BOTAN_SIMD_USE_SSSE3)
744#elif defined(BOTAN_SIMD_USE_NEON)
746#elif defined(BOTAN_SIMD_USE_ALTIVEC)
747 const __vector
unsigned char mask = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
749#elif defined(BOTAN_SIMD_USE_LSX)
750 const auto mask =
SIMD_4x32(0x07060504, 0x0B0A0908, 0x0F0E0D0C, 0x13121110);
756#if defined(BOTAN_SIMD_USE_SSSE3)
758#elif defined(BOTAN_SIMD_USE_NEON)
760#elif defined(BOTAN_SIMD_USE_ALTIVEC)
761 const __vector
unsigned char mask = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
763#elif defined(BOTAN_SIMD_USE_LSX)
768 native_simd_type
raw() const noexcept {
return m_simd; }
770 explicit SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
773 native_simd_type m_simd;
780 return input.
rotl<R>();
785 return input.
rotr<R>();
791 return input.
shl<S>();
SIMD_4x32 andc(const SIMD_4x32 &other) const noexcept
void store_le(uint8_t out[]) const noexcept
SIMD_4x32(SIMD_4x32 &&other)=default
static SIMD_4x32 load_le(std::span< const uint8_t, 16 > in)
SIMD_4x32 & operator=(SIMD_4x32 &&other)=default
SIMD_4x32 operator|(const SIMD_4x32 &other) const noexcept
SIMD_4x32 operator^(const SIMD_4x32 &other) const noexcept
static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_be(const void *in) noexcept
SIMD_4x32(native_simd_type x) noexcept
void store_be(std::span< uint8_t, 16 > out) const
static void transpose(SIMD_4x32 &B0, SIMD_4x32 &B1, SIMD_4x32 &B2, SIMD_4x32 &B3) noexcept
static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 byte_shuffle(const SIMD_4x32 &tbl, const SIMD_4x32 &idx)
static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr4(const SIMD_4x32 &a, const SIMD_4x32 &b)
SIMD_4x32 operator+(const SIMD_4x32 &other) const noexcept
void store_le(std::span< uint8_t, 16 > out) const
SIMD_4x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept
native_simd_type raw() const noexcept
void store_le(uint32_t out[4]) const noexcept
static SIMD_4x32 load_le(const void *in) noexcept
SIMD_4x32 sigma1() const noexcept
SIMD_4x32(const SIMD_4x32 &other)=default
static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr8(const SIMD_4x32 &a, const SIMD_4x32 &b)
void operator^=(uint32_t other) noexcept
void operator^=(const SIMD_4x32 &other) noexcept
void operator+=(const SIMD_4x32 &other) noexcept
SIMD_4x32 operator~() const noexcept
void store_le(uint64_t out[2]) const noexcept
void operator|=(const SIMD_4x32 &other) noexcept
static SIMD_4x32 load_be(std::span< const uint8_t, 16 > in)
SIMD_4x32 shift_elems_left() const noexcept
void store_be(uint32_t out[4]) const noexcept
SIMD_4x32 sigma0() const noexcept
SIMD_4x32 operator-(const SIMD_4x32 &other) const noexcept
SIMD_4x32 shr() const noexcept
static SIMD_4x32 splat_u8(uint8_t B) noexcept
SIMD_4x32 rotr() const noexcept
SIMD_4x32 shl() const noexcept
static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 masked_byte_shuffle(const SIMD_4x32 &tbl, const SIMD_4x32 &idx)
SIMD_4x32 shift_elems_right() const noexcept
void operator&=(const SIMD_4x32 &other) noexcept
BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 bswap() const noexcept
SIMD_4x32 operator&(const SIMD_4x32 &other) const noexcept
SIMD_4x32 & operator=(const SIMD_4x32 &other)=default
BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 rotl() const noexcept
static SIMD_4x32 choose(const SIMD_4x32 &mask, const SIMD_4x32 &a, const SIMD_4x32 &b) noexcept
void operator-=(const SIMD_4x32 &other) noexcept
static SIMD_4x32 majority(const SIMD_4x32 &x, const SIMD_4x32 &y, const SIMD_4x32 &z) noexcept
BOTAN_FN_ISA_SIMD_4X32 void store_be(uint8_t out[]) const noexcept
static SIMD_4x32 splat(uint32_t B) noexcept
BOTAN_FORCE_INLINE constexpr T rotr(T input)
constexpr uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3)
constexpr auto store_le(ParamTs &&... params)
BOTAN_FORCE_INLINE constexpr T rotl(T input)
SIMD_4x32 shl(SIMD_4x32 input)
constexpr auto load_le(ParamTs &&... params)
constexpr auto store_be(ParamTs &&... params)
constexpr auto load_be(ParamTs &&... params)