@@ -195,7 +195,8 @@ inline poly64x2_t
195
195
template <std::uint32_t Polynomial>
196
196
std::uint32_t CRC32_PMULL (std::span<const std::byte> Data, std::uint32_t CRC)
197
197
{
198
- poly64x2x4_t CRCVec = reinterpret_cast <const poly64x2x4_t *>(Data.data ())[0 ];
198
+ poly64x2x4_t CRCVec
199
+ = vld1q_p64_x4 (reinterpret_cast <const poly64_t *>(Data.data ()));
199
200
200
201
Data = Data.subspan (64 );
201
202
@@ -221,7 +222,7 @@ std::uint32_t CRC32_PMULL(std::span<const std::byte> Data, std::uint32_t CRC)
221
222
const poly64x2_t MulHi3 = pmull_p64<1 , 1 >(CRCVec.val [3 ], K1K2);
222
223
223
224
const poly64x2x4_t Load
224
- = reinterpret_cast <const poly64x2x4_t *>(Data.data ())[ 0 ] ;
225
+ = vld1q_p64_x4 ( reinterpret_cast <const poly64_t *>(Data.data ())) ;
225
226
226
227
CRCVec.val [0 ] = eor3_p64 (MulHi0, MulLo0, Load.val [0 ]);
227
228
CRCVec.val [1 ] = eor3_p64 (MulHi1, MulLo1, Load.val [1 ]);
@@ -260,7 +261,7 @@ std::uint32_t CRC32_PMULL(std::span<const std::byte> Data, std::uint32_t CRC)
260
261
for ( ; Data.size () >= 16 ; Data = Data.subspan (16 ) )
261
262
{
262
263
const poly64x2_t Load
263
- = * reinterpret_cast <const poly64x2_t *>(Data.data ());
264
+ = vld1q_p64 ( reinterpret_cast <const poly64_t *>(Data.data () ));
264
265
265
266
const poly64x2_t MulLo = pmull_p64<0 , 0 >(CRCVec.val [0 ], K3K4);
266
267
const poly64x2_t MulHi = pmull_p64<1 , 1 >(CRCVec.val [0 ], K3K4);
0 commit comments