File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -668,6 +668,12 @@ if test "x$php_crypt_r" = "x1"; then
668
668
PHP_CRYPT_R_STYLE
669
669
fi
670
670
671
+ php_aarch64_crc32="1"
672
+ AC_CHECK_FUNCS ( [ __crc32d __crc32w __crc32h __crc32b] , [ ] , [ php_aarch64_crc32="0" ] )
673
+ if test "x$php_aarch64_crc32" = "x1"; then
674
+ AC_DEFINE ( [ HAVE_AARCH64_CRC32] , [ 1] , [ Define when aarch64 CRC32 API is available.] )
675
+ fi
676
+
671
677
dnl Check for asm goto support.
672
678
AC_CACHE_CHECK ( [ for asm goto] , ac_cv__asm_goto ,
673
679
[ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
Original file line number Diff line number Diff line change 18
18
#include "basic_functions.h"
19
19
#include "crc32.h"
20
20
21
- #if defined( __aarch64__ ) && defined( HAVE_SYS_AUXV_H )
21
+ #if HAVE_AARCH64_CRC32
22
22
# include <arm_acle.h>
23
23
# if defined(__linux__ )
24
24
# include <sys/auxv.h>
@@ -83,7 +83,7 @@ PHP_FUNCTION(crc32)
83
83
84
84
crc = crcinit ^0xFFFFFFFF ;
85
85
86
- #if defined( __aarch64__ ) && defined( HAVE_SYS_AUXV_H )
86
+ #if HAVE_AARCH64_CRC32
87
87
if (has_crc32_insn ()) {
88
88
crc = crc32_aarch64 (crc , p , nr );
89
89
RETURN_LONG (crc ^0xFFFFFFFF );
You can’t perform that action at this time.
0 commit comments