Commit Graph

28 Commits (d31c991614dcc6081d6523a4cdc100c0c6ae2ebd)

Author SHA1 Message Date
Jeffrey Walton f2a303c30b
Cut-over to Wei's wide AES encryption for ARMv8
Wei's AESNI routines use ARMV8_Enc_Block, ARMV8_Enc_4_Blocks, ARMV8_Dec_Block, ARMV8_Dec_4_Blocks. They increased performance for ECB, CTR and CBC mode. Formerly ECB mode was rinning at 2.3 cpb. After the cut-over ECB dropped to 1.1 cpb.
2017-08-15 12:11:17 -04:00
Jeffrey Walton 5f441d28e5
Cleanup __m128 casts due to Clang 2017-08-13 06:53:35 -04:00
Jeffrey Walton 93a8f9e9b7
Fix compile with GCC on Solaris 2017-08-11 16:08:28 -04:00
Jeffrey Walton 5b945a5412
Update for earlier Apple compilers, like Apple Clang 6 and 8 2017-08-11 14:24:05 -04:00
Jeffrey Walton 8a66353b2c
Test <arm_acle.h> include under Apple
This is a compile test
2017-08-11 12:31:04 -04:00
Jeffrey Walton 22b7d74e1f
Test Apple ARM64 runtime detection
This is a compile test
2017-08-11 11:57:30 -04:00
Jeffrey Walton a46377caf7
Clear "C4189: 'keys': local variable is initialized but not referenced" 2017-08-11 08:32:09 -04:00
Jeffrey Walton 0c194bbc46
Fix "SSE4.2 instruction set not enabled"
Also see https://gcc.gnu.org/ml/gcc-help/2017-08/msg00015.html
2017-08-11 05:28:36 -04:00
Jeffrey Walton 69b3a7a664
Fix compile on Solaris 11.3 under GCC and SunCC 2017-08-09 00:14:54 -04:00
Jeffrey Walton b7c7874d15
Defer on cast from wor32* to __m128i*
It appears this is optimized better, and it saves 0.1 cpb
2017-08-08 20:49:44 -04:00
Jeffrey Walton 0b8d6465bd
Use consistent naming of <class>_<inner class>_<func>_<arch> 2017-08-08 19:10:56 -04:00
Jeffrey Walton 6590a928ce
Add Android ARMv8 guards 2017-08-07 21:04:23 -04:00
Jeffrey Walton a8cbfc52fc
__android__ → __ANDROID__
Also see https://stackoverflow.com/q/6374523/608639
2017-08-07 12:18:39 -04:00
Jeffrey Walton 42d91b76fc
Fix compile under Clang 3.5 due to use of SSE4.1
Both Apple and LLVM Clang want -msse4.2 even when only SSE4.1 is used. Sidestep it because we don't know how it will affect some of the lower end Atoms.

84877:/usr/include/clang/3.5.0/include/nmmintrin.h:28:2: error: "SSE4.2 instruction set not enabled"
84878:#error "SSE4.2 instruction set not enabled"
84880:rijndael-simd.cpp:466:26: error: use of undeclared identifier '_mm_extract_epi32'; did you mean '_mm_extract_epi16'?
84887:rijndael-simd.cpp:480:11: error: use of undeclared identifier '_mm_insert_epi32'; did you mean '_mm_insert_epi16'?
84894:rijndael-simd.cpp:485:11: error: use of undeclared identifier '_mm_insert_epi32'; did you mean '_mm_insert_epi16'?
...
2017-08-07 12:03:17 -04:00
Jeffrey Walton d95a38a9fc
Add Android CPU feature detection code
Also see https://developer.android.com/ndk/guides/cpu-features.html
2017-08-07 11:20:14 -04:00
Jeffrey Walton a04dda56fa
Separate Aarch32 and Aarch64 guards
Also see https://sourceware.org/ml/libc-help/2017-08/msg00012.html
2017-08-07 10:37:02 -04:00
Jeffrey Walton 2ac6c6dd20
Add Aarch32 and Aarch64 specific guards for Linux 2017-08-07 07:58:16 -04:00
Jeffrey Walton 89ccfad2d0
Use getauxval on Linux for features
getauxval() is the recommended way to determine features on Linux. Its likely less expensive than CPU probing for SIGILLs. We gave up portability, but some gained stability
2017-08-07 07:37:08 -04:00
Jeffrey Walton 08cb017836
Update comments
Provide CriticalBlue with recognition of their helpful work with mbedTLS. Thanks to Johannes Schneiders, Skip Hovsmith and Barry O'Rourke
2017-08-07 05:30:15 -04:00
Jeffrey Walton 6478d6db87
Unroll ARMv8 AES encryption and decyption loops
Unrolling gains about 0.3 to 0.5 cpb
2017-08-07 01:32:25 -04:00
Jeffrey Walton 9e5fbbe2e0
Clear C4267: 'argument': conversion from 'size_t' to 'unsigned int'
rijndael-simd.cpp(318): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data [C:\projects\cryptopp\cryptlib.vcxproj]
  rijndael-simd.cpp(376): note: see reference to function template instantiation 'size_t CryptoPP::Rijndael_AdvancedProcessBlocks_AESNI<void(__cdecl *)(__m128i &,const __m128i *,unsigned int),void(__cdecl *)(__m128i &,__m128i &,__m128i &,__m128i &,const __m128i *,unsigned int)>(F1,F4,const __m128i *,::size_t,const CryptoPP::byte *,const CryptoPP::byte *,CryptoPP::byte *,::size_t,CryptoPP::word32)' being compiled
          with
          [
              F1=void (__cdecl *)(__m128i &,const __m128i *,unsigned int),
              F4=void (__cdecl *)(__m128i &,__m128i &,__m128i &,__m128i &,const __m128i *,unsigned int)
          ]
rijndael-simd.cpp(355): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
2017-08-07 00:49:18 -04:00
Jeffrey Walton 1459042324
Fix ARMv8 AES Decryption
AES ECB and CTR mode encryption is running about 2.8 to 3.0 cpb.
Hallelujah, its a wrap.
2017-08-06 22:57:02 -04:00
Jeffrey Walton 701ec3aa1f
Fix ARMv8 AES Encryption
ARMv8 AES decryption is not working at the moment. This check-in will allow us to test the current changes more widespread. We expected AES decryption failures only
2017-08-06 21:25:36 -04:00
Jeffrey Walton 679000104c
Fix ARMv8 compile for AES 2017-08-05 20:52:02 -04:00
Jeffrey Walton 79f727d714
Clear conversion warning under MSVC 2017-08-03 01:05:11 -04:00
Jeffrey Walton b9ab0579d3
Fix Clang compile 2017-08-01 05:55:06 -04:00
Jeffrey Walton 1356456f05
Finish AESNI cut-in
Remove specialized MMX and ISSE support. SSE2 is now the floor
2017-08-01 01:20:30 -04:00
Jeffrey Walton 142fe88ae1
Initial AES cleanup after cross-platofrm testing 2017-07-31 23:17:18 -04:00