Commit Graph

16 Commits (129d65d987de231c200b5339e3ef978e9d1c475a)

Author SHA1 Message Date
Jeffrey Walton 8146eda6a3
Clear unused variable warnings under GCC 2018-03-09 06:45:32 -05:00
Fabrice Fontaine 3c01bcc352 Allow user to set -DCRYPTOPP_ARM_NEON_AVAILABLE=0 (#595)
Disable neon through -DCRYPTOPP_ARM_NEON_AVAILABLE=0,
replace "if defined(CRYPTOPP_ARM_NEON_AVAILABLE)" by
"if (CRYPTOPP_ARM_NEON_AVAILABLE)"

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-05 18:49:10 -05:00
Jeffrey Walton 143f5a3079
Handle C++17 std::uncaught_exceptions (GH #590) 2018-02-21 09:59:52 -05:00
Jeffrey Walton bd8c20562c
Clear unused variable warnings 2018-02-20 17:03:32 -05:00
Jeffrey Walton 33c10bc027
Fix ODR violation in AdvancedProcessBlocks_{ARCH} (GH #585)
The ALTIVEC function required an inline declaration. Lack of inline caused the self test failure. Two NEON functions needed the same. We also cleaned up constants in unnamed namespaces
2018-02-20 13:17:05 -05:00
Jeffrey Walton 85993b2529
Add xorInput and xorOutput flags to adv-simd classes
Analysis tools are generating findings when the pointer xorBlocks is used as the flag. The other missing piece is, xorBlocks is never NULL when either BT_XorInput or BT_XorOuput. But we don't know how to train the analyzers with the information, so we make it explicit with the boolean flags xorInput and xorOutput.
Switching to the explicit flags costs us about 0.01 cpb on a modern Intel Core processor. In the typical case 0.01 is negligible.
2018-01-24 12:06:15 -05:00
Jeffrey Walton e4e1fbe0ed
Clear Coverity findings CID 186951, 186950, 186947
Coverity does not realize xorBlocks is always non-NULL when BT_XorInput is set
2018-01-19 19:42:03 -05:00
Jeffrey Walton 4f2c605209
Add Power4 unaligned Load and Store 2018-01-05 21:27:27 -05:00
Jeffrey Walton d6d53f2e9d
Add Power4 Vector Load, Store, Add and Xor 2018-01-02 08:13:42 -05:00
Jeffrey Walton fac3a44a84
Move Altivec AdvancedProcessBlocks into adv-simd.h 2018-01-02 07:08:13 -05:00
Jeffrey Walton 7b14ead0f3
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan
This function was missed earlier. Unfortunately, it does not squash all of the unaligned load findings. I'm pretty sure it is a GCC problem
2017-12-28 01:16:17 -05:00
Jeffrey Walton 19deccf3ba
Fix Clang 5.0 "runtime error: addition of unsigned offset to 0xXXXX overflowed to 0xYYYY" (GH #549) 2017-12-16 18:18:53 -05:00
Jeffrey Walton dc21de2483
Fix UBsan overflow finding
We were cating UBsan findings under Clang similar to "adv-simd.h:1138:26: runtime error: addition of unsigned offset to 0x000002d41410 overflowed to 0x000002d41400". The problem was CRYPTOPP_CONSTANT, which used an enum. The compiler is allowed to pick the underlying data type, and Clang was picking a signed type
2017-12-16 14:21:08 -05:00
Jeffrey Walton 195ac2c7c9
Refactor rijndael-simd.cpp and simon.simd.cpp to use adv-simd.h 2017-12-10 11:09:50 -05:00
Jeffrey Walton e90cc9a028
Update comments 2017-12-10 05:41:19 -05:00
Jeffrey Walton 8a5911e6eb
Refactor <cipher>_AdvancedProcessBlocks_<arch> into adv-simd.h
This also fixes the SPECK64 bug where CTR mode self tests fail. It was an odd failure because it only affected 64-bit SPECK. SIMON was fine and it used nearly the same code. We tracked it down through trial and error to the table based rotates.
2017-12-09 21:04:25 -05:00