Commit Graph

4127 Commits (c992fe98a9ba7b10f5f6c83d0770ad50d00aa67c)

Author SHA1 Message Date
Jeffrey Walton bcf05a6c6b
Add additional PowerPC self tests 2018-08-08 20:52:50 -04:00
Jeffrey Walton 0464641069
Remove unneeded enum from VectorShiftLeftVectorShiftRight 2018-08-08 20:17:14 -04:00
Jeffrey Walton 00e7d02a8a
Fix Altive VectorStore on little-endian
Remove unneeded VectorLeftShift(a,b) and VectorRightShift(a,b)
2018-08-08 19:59:14 -04:00
Jeffrey Walton 96405e14ec
Fix VectorShiftRight on PowerPC 2018-08-08 05:06:58 -04:00
Jeffrey Walton 4c30f57d1b
Update comments 2018-08-06 23:04:10 -04:00
Jeffrey Walton d4428d7f1c
Add VectorLoad and VectorStore test code
Applies to POWER4 and above only
2018-08-06 22:19:59 -04:00
Jeffrey Walton a4ebb75538
Update comments 2018-08-06 18:37:25 -04:00
Jeffrey Walton 194307308c
Cleanup VPMSUM probes 2018-08-06 18:06:32 -04:00
Jeffrey Walton 2ec9c9963c
Update documentation 2018-08-06 06:47:57 -04:00
Jeffrey Walton 9ff731824b
Prepare for POWER8 carryless multiplies using vpmsum 2018-08-06 05:40:38 -04:00
Jeffrey Walton 6cd7f83346
Cleanup PPC vector functions
The Crypto++ functions follow IBM's lead and provide VectorLoad, VectorLoadBE, VectorStore, and VectorStoreBE. Additionally, VectorLoadKey was removed in favor of vanilla VectorLoad.
2018-08-06 05:15:12 -04:00
Jeffrey Walton 9c27143522
Whitespace check-in 2018-08-05 13:31:25 -04:00
Jeffrey Walton 58b7abe106
Update comments 2018-08-05 12:32:36 -04:00
Jeffrey Walton 1dd0e321a6
Rework Makefile and ppc-simd.h for XLC and LLVM front-end changes 2018-08-05 05:39:42 -04:00
Tanzinul Islam da00422d3c Fix build with Embarcadero C++Builder 10.2.3 (#696)
Fix two compilation errors encountered with C++Builder (Starter Edition):

 - In `cpu.cpp`, 0ccdc197b introduced a dependency on `_xgetbv()` from `<immintrin.h>` that doesn't exist on C++Builder. Enlist it for the workaround, similar to SunCC in 692ed2a2b.

 - In `adv-simd.h`, `<pmmintrin.h>` is being #included under the `CRYPTOPP_SSE2_INTRIN_AVAILABLE` macro. This header, [which apparently provides SSE3 intrinsics](https://stackoverflow.com/a/11228864/1433768), is not shipped with C++Builder. (This section of code was recently downgraded from a SSSE3 to a SSE2 block in 09c8ae28, followed by moving away from `<immintrin.h>` in bc8da71a, followed by reintroducing the SSSE3 check in d1e646a5.) Split the SSE2 and SSSE3 cases such that `<pmmintrin.h>` is not #included for SSE2. This seems safe to do, because some `git grep` analysis shows that:
    - `adv-simd.h` is not #included by any other header, but only directly #included by some `.cpp` files.
    - Among those `.cpp` files, only `sm4-simd.cpp` has a `CRYPTOPP_SSE2_INTRIN_AVAILABLE` preprocessor block, and there it again includes the other two headers (`<emmintrin.h>` and `<xmmintrin.h>`).

NOTE: I was compiling via the IDE after [setting up a project file](https://github.com/tanzislam/cryptopals/wiki/Importing-into-Embarcadero-C%E2%94%BC%E2%94%BCBuilder-Starter-10.2#using-the-crypto-library). My compilation command was effectively:

```
bcc32c.exe -DCRYPTOPP_NO_CXX11 -DCRYPTOPP_DISABLE_SSSE3 -D__SSE2__ -D__SSE__ -D__MMX__
```
2018-08-04 22:54:36 -04:00
Jeffrey Walton e82ee1c6f0
Fix typo in SM4 recipe on PowerPC 2018-08-04 20:28:31 -04:00
Jeffrey Walton aee00b69ad
Clean *.lst files created by XLC 2018-08-04 20:18:50 -04:00
Jeffrey Walton 9ce1648f83
Update comments 2018-08-03 16:16:08 -04:00
Jeffrey Walton f67efe75c9
Remove POWER5 define. We don't use it
The 64-bit 'vector long long' is POWER8
2018-08-03 14:17:13 -04:00
Jeffrey Walton 4540ab4f10
Rework PPC probes for XLC and LLVM 2018-08-03 07:02:27 -04:00
Jeffrey Walton 8019362bd6
Clear unused variable warnings under MSVC 2018-08-03 06:17:22 -04:00
Jeffrey Walton 81a5429e56
Remove iPhoneSimulator from Travis allowed failures 2018-08-03 05:44:30 -04:00
Jeffrey Walton eca0458d03
Update comments 2018-08-03 05:08:21 -04:00
Jeffrey Walton 1bd18dd5ba
Simplify RDRAND and RDSEED logic
Travis testing on GitHub showed a RDSEED failure with a "no implementation" failure. Stepping back the RDRAND and RDSEED impl logic was too complex. It offered choices when there was no need for them. For MSC we only need the MASM implementation. For U&L we only need the inline assembly that emits the byte codes (and not the instruction). The byte codes cover from GCC 3.2, Clang 2.8 and onwards
2018-08-03 04:34:20 -04:00
Jeffrey Walton 7e14cab8a3
Rework PPC probes for XLC and LLVM 2018-08-03 02:54:50 -04:00
Jeffrey Walton c4eb38b856
Improve CPU_ProbePower8() test 2018-08-03 01:27:39 -04:00
Jeffrey Walton c4ef77bcdb
Attempt to use glibtool if available 2018-08-02 23:21:59 -04:00
Jeffrey Walton fdc3045e34
Copy setenv-ios.sh into TestScripts
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:29:25 -04:00
Jeffrey Walton 85ea200ff0 Revert "Copy setenv-ios.sh into TestScripts"
The copy happened the wrong way.

This reverts commit a6143862a3.
2018-08-02 00:28:35 -04:00
Jeffrey Walton f0fdb3bc16
Bump Travis OS X image to 9.4 2018-08-02 00:16:02 -04:00
Jeffrey Walton a6143862a3
Copy setenv-ios.sh into TestScripts
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:13:13 -04:00
Jeffrey Walton 3753a4301d
Disable ASM for iOS simulators 2018-08-01 23:10:01 -04:00
Jeffrey Walton 5eec90bee5
Cleared unused variable warning 2018-08-01 22:32:26 -04:00
Jeffrey Walton 70c9fe4712
Remove calls to chmod and xattr 2018-08-01 22:01:52 -04:00
Jeffrey Walton f9f307668b
Add false DOCUMENT_DIRECTORY for GNUmakefile-cross 2018-08-01 21:52:46 -04:00
Jeffrey Walton a1b30685ab
Fix distclean rule in GNUmakefile-cross 2018-08-01 21:33:24 -04:00
Jeffrey Walton 89ec3c4a25
Guard for missing libtoolize 2018-08-01 13:57:35 -04:00
Jeffrey Walton 57521bd22a
Add calls to 'make clean' to ensure building artifacts 2018-07-31 19:53:40 -04:00
Jeffrey Walton 27968af8a9
Update to support IBM XLC and LLVM backend 2018-07-31 18:21:44 -04:00
Jeffrey Walton 5367d26327
Fix compile when adhoc.cpp is missing 2018-07-31 13:33:57 -04:00
Jeffrey Walton 7ff5f0dcf1
Try fix Travis testing on OS X 2018-07-31 11:48:54 -04:00
Jeffrey Walton 319698e43f
Rework GNUmakefiles for XL C/C++ changes 2018-07-31 02:17:13 -04:00
Jeffrey Walton 8c3658fce8
Rework GNUmakefiles for XL C/C++ changes 2018-07-31 02:13:17 -04:00
Jeffrey Walton b4a041a71b
Add -qxlcompatmacros for IBM XL C/C++ when available
Also see https://lists.tetaneutral.net/pipermail/cfarm-users/2018-July/000331.html
2018-07-30 23:22:10 -04:00
Jeffrey Walton 4b13ccea5d
Remove automatic bitness selection on PPC64 2018-07-30 20:40:05 -04:00
Jeffrey Walton 00135f5b5b
Add CRYPTOPP_ALIGN_DATA for IBM XL C/C++ 2018-07-30 20:32:45 -04:00
Jeffrey Walton d563c5da94
Fix SHA-256 on AIX using IBM XL C/C++ and POWER8 crypto
We were using aligned loads of the key table SHA256_K. The key table was declared as 16-byte aligned but it appears the table was not aligned in memory.
2018-07-30 19:53:39 -04:00
Jeffrey Walton 0c8a9458cc
Fix compile for AIX using GCC and IBM XL C/C++ 2018-07-30 19:14:51 -04:00
Jeffrey Walton 9396dc46ec
Update comments 2018-07-30 15:58:44 -04:00
Jeffrey Walton f36562218f
Add call to ls upon failure of script 2018-07-30 15:40:13 -04:00