Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ext/standard/crc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#include "crc32_x86.h"

#ifdef HAVE_AARCH64_CRC32
#ifndef PHP_WIN32
# include <arm_acle.h>
#endif
# if defined(__linux__)
# include <sys/auxv.h>
# include <asm/hwcap.h>
Expand Down Expand Up @@ -53,6 +55,9 @@ static inline int has_crc32_insn() {
if (sysctlbyname("hw.optional.armv8_crc32", &res, &reslen, NULL, 0) < 0)
res = 0;
return res;
# elif defined(WIN32)
res = (int)IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE);
return res;
# else
res = 0;
return res;
Expand Down
5 changes: 5 additions & 0 deletions ext/standard/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ void php_get_windows_cpu(char *buf, int bufsize)
case PROCESSOR_ARCHITECTURE_AMD64 :
snprintf(buf, bufsize, "AMD64");
break;
#endif
#if defined(PROCESSOR_ARCHITECTURE_ARM64)
case PROCESSOR_ARCHITECTURE_ARM64 :
snprintf(buf, bufsize, "ARM64");
break;
#endif
case PROCESSOR_ARCHITECTURE_UNKNOWN :
default:
Expand Down