Skip to content

Commit bd21aa7

Browse files
staticfloatararslan
authored andcommitted
Use JL_AArch64_crc instead of HWCAP_CRC32 (JuliaLang#30324)
Closes JuliaLang#26458
1 parent 1bd316b commit bd21aa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/crc32c.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
#include "julia.h"
4545
#include "julia_internal.h"
46+
#include "processor.h"
4647

4748
#ifdef _CPU_AARCH64_
4849
# include <sys/auxv.h>
@@ -333,7 +334,7 @@ JL_DLLEXPORT uint32_t jl_crc32c(uint32_t crc, const char *buf, size_t len)
333334
# else
334335
static crc32c_func_t crc32c_dispatch(unsigned long hwcap)
335336
{
336-
if (hwcap & HWCAP_CRC32)
337+
if (hwcap & (1 << JL_AArch64_crc))
337338
return crc32c_armv8;
338339
return jl_crc32c_sw;
339340
}

0 commit comments

Comments
 (0)