Skip to content

Commit

Permalink
Rebase the patch to master
Browse files Browse the repository at this point in the history
Change-Id: I3044a89bae619968e340636996f014a0134f1030
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
  • Loading branch information
guyuqi committed Nov 25, 2018
1 parent e9c1317 commit 32f5f4f
Show file tree
Hide file tree
Showing 7 changed files with 509 additions and 949 deletions.
20 changes: 20 additions & 0 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,26 @@ if (APPLE)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -stdlib=libc++")
endif()

if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
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\");
unsigned int foo(unsigned int ret) {
CRC32CX(ret, 0);
return ret;
}
int main() { foo(0); }" ARROW_HAVE_ARMCE)
if (ARROW_HAVE_ARMCE)
message(STATUS " aarch64 CRC32 supported")
endif()

CHECK_CXX_COMPILER_FLAG("-march=armv8-a+crc" HAVE_ARMV8_CRC_INTRINSICS)
if (HAVE_ARMV8_CRC_INTRINSICS)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -march=armv8-a+crc")
message(STATUS " aarch64 CRC32 INTRINSICS supported")
endif()
endif()

# ----------------------------------------------------------------------
# Setup Gold linker, if available. Code originally from Apache Kudu

Expand Down

0 comments on commit 32f5f4f

Please sign in to comment.