From bd21aa75eb4c0e56ef870f6bffea3281c724cbb1 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sun, 9 Dec 2018 13:57:44 -0800 Subject: [PATCH] Use `JL_AArch64_crc` instead of `HWCAP_CRC32` (#30324) 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; }