From 80d3149dd0edd0b46dc4fd75ed4964a79291d66a Mon Sep 17 00:00:00 2001 From: "staticfloat@gmail.com" Date: Sun, 9 Dec 2018 08:08:17 +0000 Subject: [PATCH] Use `JL_AArch64_crc` instead of `HWCAP_CRC32` Closes https://github.com/JuliaLang/julia/issues/26458 --- src/crc32c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crc32c.c b/src/crc32c.c index f9100a22abe93..9ad1991d3c804 100644 --- a/src/crc32c.c +++ b/src/crc32c.c @@ -43,6 +43,7 @@ #include "julia.h" #include "julia_internal.h" +#include "processor.h" #ifdef _CPU_AARCH64_ # include @@ -333,7 +334,7 @@ JL_DLLEXPORT uint32_t jl_crc32c(uint32_t crc, const char *buf, size_t len) # else static crc32c_func_t crc32c_dispatch(unsigned long hwcap) { - if (hwcap & HWCAP_CRC32) + if (hwcap & (1 << JL_AArch64_crc)) return crc32c_armv8; return jl_crc32c_sw; }