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 Feb 20, 2020
1 parent bf71bef commit e396423
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 e396423

Please sign in to comment.