Commit Graph

22 Commits

Author SHA1 Message Date
Jeffrey Walton
4e3a1ea962
Add ARMv8.4 cpu feature detection support (GH #685) (#687)
This PR adds ARMv8.4 cpu feature detection support. Previously we only needed ARMv8.1 and things were much easier. For example, ARMv8.1 `__ARM_FEATURE_CRYPTO` meant PMULL, AES, SHA-1 and SHA-256 were available. ARMv8.4 `__ARM_FEATURE_CRYPTO` means PMULL, AES, SHA-1, SHA-256, SHA-512, SHA-3, SM3 and SM4 are  available. 

We still use the same pattern as before. We make something available based on compiler version and/or preprocessor macros. But this time around we had to tighten things up a bit to ensure ARMv8.4 did not cross-pollinate down into ARMv8.1.

ARMv8.4 is largely untested at the moment. There is no hardware in the field and CI lacks QEMU with the relevant patches/support. We will probably have to revisit some of this stuff in the future.

Since this update applies to ARM gadgets we took the time to expand Android and iOS testing on Travis. Travis now tests more platforms, and includes Autotools and CMake builds, too.
2018-07-15 08:35:14 -04:00
Jeffrey Walton
0cee6f01f0
Squash MS LNK4221 and libtool warnings 2018-07-06 01:22:38 -04:00
Ilja
8f730529b9 Remove extra ; from sha-simd.cpp (PR #622) 2018-03-31 13:04:00 -04:00
Jeffrey Walton
e7be3a8357
Fix compile on AIX using const pointers
Also see the discussion at noloader/POWER8-crypto#2
2018-03-20 23:50:51 -04:00
Jeffrey Walton
9a52edcfdb
Remove non-const cast from POWER8 loads and stores
Also see the discussion at https://github.com/noloader/POWER8-crypto/issues/2
2018-03-20 15:02:47 -04:00
Jeffrey Walton
92ad65bfae
Clear unused variable warning 2018-03-11 21:45:19 -04:00
Jeffrey Walton
a0cbdc7ba4
Switch to 2-mask version of vec_perm for repack 2018-03-11 13:56:02 -04:00
Jeffrey Walton
03d4508a76
Whitespace check-in 2018-03-11 12:52:03 -04:00
Jeffrey Walton
07ece016b7
Add VectorLoadMsg and comments (GH #513) 2018-03-11 12:45:14 -04:00
Jeffrey Walton
0630d46fe8
Add PowerPC Power8 SHA hashing (GH #513)
Perforance increases significantly, but there's still room for improvement. Even OpenSSL's numbers are relatively dull. We expect Power8's SHA-256 to be somewhere between 2 to 8 cpb but we are not hitting them.

SHA-256, GCC112 (ppc64-le): C++ 23.43, Power8 13.24 cpb (+ 110 MiB/s)
SHA-256, GCC119 (ppc64-be): C++ 10.16, Power8  9.74 cpb (+ 50 MiB/s)

SHA-512, GCC112 (ppc64-le): C++ 14.00, Power8 9.25 cpb (+ 150 MiB/s)
SHA-512, GCC119 (ppc64-be): C++ 21.05, Power8 6.17 cpb (+ 450 MiB/s)
2018-03-10 16:19:11 -05:00
Jeffrey Walton
5cee4a6573
Improve logic for <arm_acle.h> include (GH #568) 2018-01-20 13:23:41 -05:00
Jeffrey Walton
b7e636ac51
Rename ppc-crypto.h to ppc-simd.h 2017-12-12 07:15:59 -05:00
Jeffrey Walton
ced7cff64f
Add Power8 SHA256 and SHA512 support (GH #513) 2017-09-22 09:39:36 -04:00
Jeffrey Walton
3bd01f73ba
Add Power8 SHA256 and SHA512 support (GH #513) 2017-09-22 08:58:50 -04:00
Jeffrey Walton
6102333fc3
Add CRYPTOPP_NO_CPU_FEATURE_PROBES (GH #511)
We determine machine capabilities by performing an os/platform *query* first, like getauxv(). If the *query* fails, we move onto a cpu *probe*. The cpu *probe* tries to exeute an instruction and then catches a SIGILL on Linux or the exception EXCEPTION_ILLEGAL_INSTRUCTION on Windows. Some OSes fail to hangle a SIGILL gracefully, like Apple OSes. Apple machines corrupt memory and variables around the probe.
2017-09-19 21:08:37 -04:00
Jeffrey Walton
f0c2324f6b
Fix armeabi and armv7-a for Android (GH #509) 2017-09-17 20:07:53 -04:00
Jeffrey Walton
8d98417306
Add Aarch64 specific defines to Android cross-compile
Move <arm_acle.h> logic into "sonfig.h". Detecting when we can/should include <arm_acle.h> is proving to be troublesome
2017-09-13 17:16:57 -04:00
Jeffrey Walton
d748d4cfbe
Update header guards for x86 2017-09-12 05:39:33 -04:00
Jeffrey Walton
17bf824790
Guard <arm_acle.h> include for GCC 4.8
Use system includes for <arm_neon.h> and <arm_acle.h>
2017-09-12 05:29:51 -04:00
Jeffrey Walton
a1b3102eab
Update comments 2017-08-19 01:35:36 -04:00
Jeffrey Walton
51fe8a7776
Guard use of SIGILL probes on Apple platforms 2017-08-17 18:06:57 -04:00
Jeffrey Walton
e2c377effd Split source files to support Base Implementation + SIMD implementation (GH #461)
Split source files to support Base Implementation + SIMD implementation
2017-08-17 12:33:43 -04:00