9#include <botan/internal/simd_32.h>
16inline SIMD_4x32 rshift_1_u8(SIMD_4x32 v) {
17 return SIMD_4x32(_mm_add_epi8(v.raw(), v.raw()));
20inline SIMD_4x32 high_bit_set_u8(SIMD_4x32 v) {
21 return SIMD_4x32(_mm_cmpgt_epi8(_mm_setzero_si128(), v.raw()));
26BOTAN_FUNC_ISA(
"sse2") size_t ZFEC::addmul_sse2(uint8_t z[], const uint8_t x[], uint8_t y,
size_t size) {
29 const size_t orig_size = size;
50 for(
size_t j = 1; j != 8; ++j) {
56 const SIMD_4x32 mask_1(high_bit_set_u8(x_1));
57 const SIMD_4x32 mask_2(high_bit_set_u8(x_2));
58 const SIMD_4x32 mask_3(high_bit_set_u8(x_3));
59 const SIMD_4x32 mask_4(high_bit_set_u8(x_4));
62 x_1 = rshift_1_u8(x_1);
63 x_2 = rshift_1_u8(x_2);
64 x_3 = rshift_1_u8(x_3);
65 x_4 = rshift_1_u8(x_4);
67 x_1 ^= mask_1 & polynomial;
68 x_2 ^= mask_2 & polynomial;
69 x_3 ^= mask_3 & polynomial;
70 x_4 ^= mask_4 & polynomial;
90 return orig_size - size;
static SIMD_4x32 load_le(const void *in) noexcept
static SIMD_4x32 splat_u8(uint8_t B) noexcept
#define BOTAN_FUNC_ISA(isa)