summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorDan Mick <dan.mick@redhat.com>2017-03-25 04:10:15 +0100
committerDan Mick <dan.mick@redhat.com>2017-03-25 04:10:15 +0100
commitef8980bad2239d82d6a0c764bd845714d7b4c892 (patch)
tree1fce8f806fbd0fc47659ab8894d804a2441546a8 /cmake
parentMerge pull request #13889 from liewegas/wip-denc-nullptr (diff)
downloadceph-ef8980bad2239d82d6a0c764bd845714d7b4c892.tar.xz
ceph-ef8980bad2239d82d6a0c764bd845714d7b4c892.zip
cmake/modules/SIMDExt.cmake: add whitespace
readability, man, readability Signed-off-by: Dan Mick <dan.mick@redhat.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/SIMDExt.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/modules/SIMDExt.cmake b/cmake/modules/SIMDExt.cmake
index a879ef3470f..badb94adb4b 100644
--- a/cmake/modules/SIMDExt.cmake
+++ b/cmake/modules/SIMDExt.cmake
@@ -19,6 +19,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
set(save_quiet ${CMAKE_REQUIRED_QUIET})
set(CMAKE_REQUIRED_QUIET true)
include(CheckCXXSourceCompiles)
+
check_cxx_source_compiles("
#define CRC32CX(crc, value) __asm__(\"crc32cx %w[c], %w[c], %x[v]\":[c]\"+r\"(crc):[v]\"r\"(value))
asm(\".arch_extension crc\");
@@ -34,10 +35,12 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
return ret;
}
int main() { foo(0); }" HAVE_ARMV8_CRYPTO)
+
set(CMAKE_REQUIRED_QUIET ${save_quiet})
if(HAVE_ARMV8_CRC)
message(STATUS " aarch64 crc extensions supported")
endif()
+
if(HAVE_ARMV8_CRYPTO)
message(STATUS " aarch64 crypto extensions supported")
endif()
@@ -46,16 +49,19 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
message(STATUS " aarch64 crc+crypto intrinsics supported")
set(ARMV8_CRC_COMPILE_FLAGS "${ARMV8_CRC_COMPILE_FLAGS} -march=armv8-a+crc+crypto")
endif()
+
CHECK_C_COMPILER_FLAG(-march=armv8-a+simd HAVE_ARMV8_SIMD)
if(HAVE_ARMV8_SIMD)
set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -march=armv8-a+simd")
endif()
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
set(HAVE_ARM 1)
CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON)
if(HAVE_ARM_NEON)
set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon")
endif()
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
set(HAVE_INTEL 1)
CHECK_C_COMPILER_FLAG(-msse HAVE_INTEL_SSE)
@@ -86,4 +92,5 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
if(HAVE_INTEL_SSE4_2)
set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.2")
endif()
+
endif()