Commit Graph

4918 Commits (1a0d7c516d2e665559374d50e2bc35543af34937)

Author SHA1 Message Date
Jeffrey Walton 1a0d7c516d
Disable BMI2 code paths in Integer class (GH #850) 2019-06-01 00:14:19 -04:00
Jeffrey Walton 8e27c6b3fa
Fix OS X compile with Clang later than 6.0
It looks like Apple Clang 6.0 does not provide _blsr_u32 and friends. Later versions of Clang defines _blsr_u32 and it causes a stream of warnings.
2019-05-31 23:33:17 -04:00
Jeffrey Walton 392ec3465e
Fix OS X compile with Clang 6.0 2019-05-31 23:03:24 -04:00
Jeffrey Walton 4952fa489d
Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friends
Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
2019-05-31 09:42:39 -04:00
Jeffrey Walton fb0bef1eb6
Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friends
Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
2019-05-31 05:37:35 -04:00
Jeffrey Walton aed6e935d6
Update documentation 2019-05-30 23:22:47 -04:00
Jeffrey Walton 1f2be58434
Update Doxygen comments 2019-05-30 22:30:22 -04:00
Jeffrey Walton 0dd07252d2
Update comments 2019-05-28 20:19:34 -04:00
Jeffrey Walton e40de18538
Update comments 2019-05-28 20:18:58 -04:00
Jeffrey Walton b61da7acfe
Update cryptest-autotools script 2019-05-28 06:36:01 -04:00
Jeffrey Walton a2e7c26f6c
Add 16-bit rev16 and rbit 2019-05-28 02:50:58 -04:00
Jeffrey Walton 623059f28c
Use ARM rev and rbit when appropriate
We tried to add a ByteReverse(word64) and BitReverse(word64) overloads but GCC was producing bad code for it.
2019-05-27 14:27:12 -04:00
Jeffrey Walton 81da61fe7b
Breakout sha_block_data_order and sha_block_data_order_neon (GH #847) 2019-05-26 22:10:26 -04:00
Jeffrey Walton d4b533a60f
Add Thumb and Arm versions of CPU_ProbeARMv7() 2019-05-26 17:06:55 -04:00
Jeffrey Walton 7cd8d0278a
Remove VFP_ABI_PUSH and VFP_ABI_POP macros 2019-05-26 02:14:03 -04:00
Jeffrey Walton 9a3c1e351d
Clear Valgrind finding in IncrementCounterByOne
The single buffer IncrementCounterByOne generated a Valgrind finding on ARM. This commit uses the same pattern for both overloads in case Valgrind wants to fire on the two-buffer version.
2019-05-25 19:49:49 -04:00
Jeffrey Walton ca11105a40
Clear sign comparison warning under GCC 2019-05-25 17:00:32 -04:00
Jeffrey Walton f90c162b68
Fix IncrementCounterByOne
This was introduced earlier in the day when clearing a Valgrind finding. It tested good with the self tests. However, we double process byte[0] if there's a carry.
2019-05-25 07:02:32 -04:00
Jeffrey Walton fc10a7f1ea
Fix SHA512 on ARM benchmarks
This was a mistake when porting from Cryptogams to Crypto++. The macros VFP_ABI_PUSH and VFP_ABI_POP needed to be defined because they save and restore SIMD register state. They were originally missing during the port. The benchmarks would hang because the doubles we used for benchmarking were blown away in sha512_block_data_order_neon.
2019-05-25 06:23:19 -04:00
Jeffrey Walton 92df2a685f
Clear Valgrind warnings on ARM
I don't believe these should have been findings. They were clear on x86, Aarch64 and PowerPC.
2019-05-25 03:41:05 -04:00
Jeffrey Walton 1400757fea
Update comments 2019-05-25 00:43:27 -04:00
Jeffrey Walton ea96b9d375
Use CRYPTOGAMS_armcap_P for ARM (GH #846)
Andy advised against removing the global caps variable. This commit reintroduces CRYPTOGAMS_armcap_P. However, due to the shared object symbol loading problem, we needed to use CRYPTOGAMS_armcap_P as a global, and not CRYPTOGAMS_armcap as a local. Using CRYPTOGAMS_armcap_P directly caused the symbol to be marked as R_ARM_ABS32 which avoids the problem with R_ARM_REL32.
2019-05-24 16:33:47 -04:00
Jeffrey Walton 1650cac3f3
Update comments 2019-05-23 19:35:05 -04:00
Jeffrey Walton 2a09376211
Remove const_cast from CryptogamsArmCaps() 2019-05-23 03:17:17 -04:00
Jeffrey Walton c5bb85754f
Add RDRAND and RDSEED test programs
These are for Autotools on Solaris.
2019-05-22 21:25:31 -04:00
Jeffrey Walton fed4a55f39
Update cryptest-autotools script 2019-05-22 21:03:19 -04:00
Jeffrey Walton 57b85fafce
Update Cryptogams SHA headers (GH #846) 2019-05-22 19:11:16 -04:00
Jeffrey Walton 7eaa5837e0
Fix "unexpected reloc type 0x03" for ARM shared object (GH #846) 2019-05-22 19:00:08 -04:00
Jeffrey Walton ce5d5d5c0f
Use CRYPTOGAMS_armcap_loc for word label 2019-05-22 06:37:16 -04:00
Jeffrey Walton 0a4b370d3f
Use CRYPTOGAMS_armcaps
It looks like CRYPTOGAMS_armcap was used in some places, and it broke Autotools
2019-05-22 05:46:06 -04:00
Jeffrey Walton 13e3a19e94
Remove __KERNEL__ guard
Andy's code is used in the Linux kernel. The define is not needed here.
2019-05-22 05:12:16 -04:00
Jeffrey Walton 073c246595
Rename CRYPTOGAMS_armcap_P to CRYPTOGAMS_armcap 2019-05-22 05:01:27 -04:00
Jeffrey Walton 50dd3ad354
Spelling 2019-05-22 03:04:38 -04:00
Jeffrey Walton 7287a79669
Use config_ver.h in change-version script 2019-05-22 02:56:37 -04:00
Jeffrey Walton 1abab8050e
Clear documentation warnings 2019-05-22 02:53:26 -04:00
Jeffrey Walton 879b8c6fe9
Remove unused CLANG_INTEGRATED_ASSEMBLER from Makefile
This is an artifact that should have been removed at CRYPTOPP_DISABLE_MIXED_ASM.
2019-05-21 20:05:44 -04:00
Jeffrey Walton f396ade93a
Rename XGETBV to XGETBV64 2019-05-21 19:44:48 -04:00
Jeffrey Walton 6f3be56c9d
Update comments 2019-05-21 19:40:11 -04:00
Jeffrey Walton 02cdbf61d3
Rename ExtendedControlRegister to XGETBV 2019-05-21 19:31:13 -04:00
Jeffrey Walton cf85d768b4
Fix armv8l-unknown-linux-gnueabihf yet again 2019-05-21 18:48:13 -04:00
Jeffrey Walton 5e15b46234
Fix Aarch64 compile in CPU_ProbeARMv7
Previous to the Cryptogams cut-in we could be sloppy and return anything for ARMv8. Now e have real code backing ARMv7 we need to return an accurate value.
2019-05-21 08:13:52 -04:00
Jeffrey Walton 268ea61f1c
Cutover to CRYPTOPP_LLVM_CLANG_VERSION (GH #845)
We were using CRYPTOPP_CLANG_VERSION in some places.
2019-05-21 07:54:47 -04:00
Jeffrey Walton 2d4a932c33
Remove -tvos_simulator_version_min from AppleTVSimulator
It did not clear the problem.
2019-05-21 07:08:41 -04:00
Jeffrey Walton 5b1cae0c63
Fix compile using MSVC 2013 ARM 2019-05-21 06:54:33 -04:00
Jeffrey Walton 751515901b
Limit Cryptogams AES and SHA to Linux distros
The Apple assembler cannot translate the source files for iOS.
2019-05-21 05:59:58 -04:00
Jeffrey Walton ddb9249444
Fix source warning 2019-05-21 05:44:21 -04:00
Jeffrey Walton 1973674732
Add sanity check to setenv-*.sh scripts
Prompt user to source the script when required. Whitespace check-in
2019-05-21 05:37:40 -04:00
Jeffrey Walton 3e897eb0f6
Use CRYPTOPP_ARM_NEON_AVAILABLE in neon_simd.cpp 2019-05-21 05:11:24 -04:00
Jeffrey Walton 02baab2307
Enable Cryptogams AES on ARM using Clang
It looks like AES needed -mthumb for Clang. SHA must not use -mthumb under Clang due to a crash.
2019-05-21 04:23:40 -04:00
Jeffrey Walton 6acbbf1849
Fix crash in GCM mode on ARM with -mthumb 2019-05-21 04:03:22 -04:00