File tree 2 files changed +7
-22
lines changed
2 files changed +7
-22
lines changed Original file line number Diff line number Diff line change 10
10
#include " config.h"
11
11
#include " misc.h"
12
12
13
- // We set CRYPTOPP_ARM_CRC32_AVAILABLE based on compiler version.
14
- // If the crc is not available, then we have to disable it here.
15
- // Android does not provide -march=armv8-a+crc or -march=armv8.1-a+crc, so
16
- // it looks like we will have to disable CRC acceleration of their devices.
17
- #if !(defined(__ARM_FEATURE_CRC32) || defined(_MSC_VER)) || defined(__ANDROID__)
18
- # undef CRYPTOPP_ARM_CRC32_AVAILABLE
19
- #endif
20
-
21
13
#if (CRYPTOPP_SSE42_AVAILABLE)
22
14
# include < nmmintrin.h>
23
15
#endif
24
16
25
17
#if (CRYPTOPP_ARM_CRC32_AVAILABLE)
26
18
# include < arm_neon.h>
27
- # if defined(CRYPTOPP_ARM_ACLE_AVAILABLE)
28
- # include < arm_acle.h>
29
- # endif
19
+ #endif
20
+
21
+ #if defined(CRYPTOPP_ARM_ACLE_AVAILABLE)
22
+ # include < stdint.h>
23
+ # include < arm_acle.h>
30
24
#endif
31
25
32
26
#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
Original file line number Diff line number Diff line change 8
8
9
9
NAMESPACE_BEGIN (CryptoPP)
10
10
11
- // We set CRYPTOPP_ARM_CRC32_AVAILABLE based on compiler version.
12
- // Android does not provide -march=armv8-a+crc or -march=armv8.1-a+crc, so
13
- // it looks like we will have to disable CRC acceleration of their devices.
14
- #if defined(__ANDROID__)
15
- # undef CRYPTOPP_ARM_CRC32_AVAILABLE
16
- #endif
17
-
18
11
// crc-simd.cpp
19
12
#if (CRYPTOPP_ARM_CRC32_AVAILABLE)
20
13
extern void CRC32_Update_ARMV8 (const byte *s, size_t n, word32& c);
@@ -164,8 +157,7 @@ void CRC32::Update(const byte *s, size_t n)
164
157
crc = m_tab[CRC32_INDEX (crc)] ^ CRC32_SHIFTED (crc);
165
158
crc = m_tab[CRC32_INDEX (crc)] ^ CRC32_SHIFTED (crc);
166
159
crc = m_tab[CRC32_INDEX (crc)] ^ CRC32_SHIFTED (crc);
167
- n -= 4 ;
168
- s += 4 ;
160
+ n -= 4 ; s += 4 ;
169
161
}
170
162
171
163
while (n--)
@@ -330,8 +322,7 @@ void CRC32C::Update(const byte *s, size_t n)
330
322
crc = m_tab[CRC32_INDEX (crc)] ^ CRC32_SHIFTED (crc);
331
323
crc = m_tab[CRC32_INDEX (crc)] ^ CRC32_SHIFTED (crc);
332
324
crc = m_tab[CRC32_INDEX (crc)] ^ CRC32_SHIFTED (crc);
333
- n -= 4 ;
334
- s += 4 ;
325
+ n -= 4 ; s += 4 ;
335
326
}
336
327
337
328
while (n--)
You can’t perform that action at this time.
0 commit comments