From 6e35e7387a7bc9c7fd81a4c80266d500c81d051a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 17 Aug 2017 01:47:08 -0400 Subject: [PATCH 1/2] Add debug configuration to Travis --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index bbb54fed..1ef8d774 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ env: matrix: - BUILD_MODE="all" - BUILD_MODE="no-asm" + - BUILD_MODE="debug" - BUILD_MODE="asan" - BUILD_MODE="ubsan" - BUILD_MODE="ios-arm" @@ -77,6 +78,10 @@ script: cp ./TestScripts/setenv-ios.sh . . ./setenv-ios.sh tv make -f GNUmakefile-cross + elif [[ "$BUILD_MODE" == "debug" ]]; then + CXXFLAGS="-DDEBUG -g2 -O1" make + ./cryptest.exe v + ./cryptest.exe tv all else make "$BUILD_MODE" ./cryptest.exe v From 7779fa3e7ab3ddf02efdd9a688cb874ac93b8e98 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 17 Aug 2017 02:15:42 -0400 Subject: [PATCH 2/2] Fix NEON detection on Aarch32 and Aarch64 I wish GCC would get its head out of its ass and define the apprpriate defines. NEON/ASIMD cannot be disgorged from Aarch32/Aarch64 just like SSE2 cannot be disgorged from x86_64. They are core instruction sets --- config.h | 2 +- cpu.cpp | 6 +++++- cpu.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config.h b/config.h index ba779641..0b48e8a6 100644 --- a/config.h +++ b/config.h @@ -458,7 +458,7 @@ NAMESPACE_END // Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains. #if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) -# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM) +# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM) # define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1 # endif #endif diff --git a/cpu.cpp b/cpu.cpp index 366c35e8..dcd94dd4 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -11,7 +11,11 @@ #include "cpu.h" #include "misc.h" -#include +#include "stdcpp.h" + +#if CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE +# include +#endif #ifndef CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY #include diff --git a/cpu.h b/cpu.h index d833f95c..d1ccf6f1 100644 --- a/cpu.h +++ b/cpu.h @@ -22,7 +22,7 @@ # if defined(__GNUC__) # include # endif -# if defined(__ARM_NEON) || defined(_MSC_VER) +# if defined(__ARM_NEON) || defined(__aarch32__) || defined(__aarch64__) || defined(_MSC_VER) # include # endif # if defined(__GNUC__) && !defined(__apple_build_version__)