Skip to content

Commit

Permalink
Use JL_AArch64_crc instead of HWCAP_CRC32 (#30324)
Browse files Browse the repository at this point in the history
Closes #26458

(cherry picked from commit bd21aa7)
  • Loading branch information
staticfloat authored and KristofferC committed Dec 10, 2018
1 parent c9baf5c commit 0f8c505
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crc32c.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include "julia.h"
#include "julia_internal.h"
#include "processor.h"

#ifdef _CPU_AARCH64_
# include <sys/auxv.h>
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 0f8c505

Please sign in to comment.