15#if (CRYPTOPP_ARM_NEON_HEADER)
19#if (CRYPTOPP_ARM_ACLE_HEADER)
24#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
29#ifndef EXCEPTION_EXECUTE_HANDLER
30# define EXCEPTION_EXECUTE_HANDLER 1
34extern const char NEON_SIMD_FNAME[] = __FILE__;
38#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
40 typedef void (*SigHandler)(int);
42 static jmp_buf s_jmpSIGILL;
43 static void SigIllHandler(
int)
45 longjmp(s_jmpSIGILL, 1);
52#if defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64)
54#elif defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
56#elif CRYPTOPP_ARM_NEON_AVAILABLE
57# if defined(CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY)
58 volatile bool result =
true;
64 __except (EXCEPTION_EXECUTE_HANDLER)
72 volatile bool result =
true;
74 volatile SigHandler oldHandler = signal(SIGILL, SigIllHandler);
75 if (oldHandler == SIG_ERR)
78 volatile sigset_t oldMask;
79 if (sigprocmask(0, NULLPTR, (sigset_t*)&oldMask))
81 signal(SIGILL, oldHandler);
85 if (setjmp(s_jmpSIGILL))
93 asm volatile(
"movw %0,%1 \n"
95 :
"=r"(a) :
"i"(0x1234));
98 10: e3010234 movw r0, #4660 ; 0x1234
99 14: e3410234 movt r0, #4660 ; 0x1234
103 1c: f241 2034 movw r0, #4660 ; 0x1234
104 20: f2c1 2034 movt r0, #4660 ; 0x1234
110#if defined(__thumb__)
111 ".inst.n 0xf241, 0x2034 \n\t"
112 ".inst.n 0xf2c1, 0x2034 \n\t"
115 ".inst 0xe3010234 \n\t"
116 ".inst 0xe3410234 \n\t"
119 :
"=r" (a) : :
"r0");
121 result = (a == 0x12341234);
124 sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);
125 signal(SIGILL, oldHandler);
135#if defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64)
137#elif defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
139#elif CRYPTOPP_ARM_NEON_AVAILABLE
140# if defined(CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY)
141 volatile bool result =
true;
144 uint32x4_t x = vdupq_n_u32(1);
145 uint32x4_t y = vshlq_n_u32(x, 4);
147 word32 z[4]; vst1q_u32(z, y);
148 return (z[0] & z[1] & z[2] & z[3]) == 16;
150 __except (EXCEPTION_EXECUTE_HANDLER)
158 volatile bool result =
true;
160 volatile SigHandler oldHandler = signal(SIGILL, SigIllHandler);
161 if (oldHandler == SIG_ERR)
164 volatile sigset_t oldMask;
165 if (sigprocmask(0, NULLPTR, (sigset_t*)&oldMask))
167 signal(SIGILL, oldHandler);
171 if (setjmp(s_jmpSIGILL))
181 uint32x4_t x = vdupq_n_u32(1);
182 uint32x4_t y = vshlq_n_u32(x, 4);
184 word32 z[4]; vst1q_u32(z, y);
185 result = (z[0] & z[1] & z[2] & z[3]) == 16;
188 sigprocmask(SIG_SETMASK, (sigset_t*)&oldMask, NULLPTR);
189 signal(SIGILL, oldHandler);
Library configuration file.
unsigned int word32
32-bit unsigned datatype
Crypto++ library namespace.