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
668668 PHP_CRYPT_R_STYLE
669669fi
670670
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+
671677dnl Check for asm goto support.
672678AC_CACHE_CHECK ( [ for asm goto] , ac_cv__asm_goto ,
673679[ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
Original file line number Diff line number Diff line change 1818#include "basic_functions.h"
1919#include "crc32.h"
2020
21- #if defined( __aarch64__ ) && defined( HAVE_SYS_AUXV_H )
21+ #if HAVE_AARCH64_CRC32
2222# include <arm_acle.h>
2323# if defined(__linux__ )
2424# include <sys/auxv.h>
@@ -83,7 +83,7 @@ PHP_FUNCTION(crc32)
8383
8484 crc = crcinit ^0xFFFFFFFF ;
8585
86- #if defined( __aarch64__ ) && defined( HAVE_SYS_AUXV_H )
86+ #if HAVE_AARCH64_CRC32
8787 if (has_crc32_insn ()) {
8888 crc = crc32_aarch64 (crc , p , nr );
8989 RETURN_LONG (crc ^0xFFFFFFFF );
You can’t perform that action at this time.
0 commit comments