2018-12-01 15:33:04 +00:00
|
|
|
#include <stdint.h>
|
2022-02-13 21:54:02 +00:00
|
|
|
#if (CRYPTOPP_ARM_NEON_HEADER)
|
2020-07-31 04:12:10 +00:00
|
|
|
# include <arm_neon.h>
|
|
|
|
#endif
|
2018-12-01 15:33:04 +00:00
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
2020-08-06 01:43:23 +00:00
|
|
|
// SM3 hash
|
2021-05-23 08:26:55 +00:00
|
|
|
// https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=SM3
|
2022-02-13 23:21:54 +00:00
|
|
|
uint32x4_t x={1}, y={2}, z={3};
|
|
|
|
y=vsm3ss1q_u32(x,y,z);
|
|
|
|
y=vsm3tt1aq_u32(x,y,z,3);
|
|
|
|
y=vsm3tt1bq_u32(x,y,z,1);
|
|
|
|
y=vsm3tt2aq_u32(x,y,z,2);
|
|
|
|
y=vsm3tt2bq_u32(x,y,z,3);
|
|
|
|
y=vsm3partw1q_u32(x,y,z);
|
|
|
|
y=vsm3partw2q_u32(x,y,z);
|
2020-08-06 01:43:23 +00:00
|
|
|
return 0;
|
2018-12-01 15:33:04 +00:00
|
|
|
}
|