Skip to content

Commit 8e6f229

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 02c9b09 + 800ff06 commit 8e6f229

File tree

6 files changed

+57
-58
lines changed

6 files changed

+57
-58
lines changed

cmake/Zend/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,28 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
438438
endif()
439439
endif()
440440

441+
message(CHECK_START "Checking for asm goto support")
442+
cmake_push_check_state(RESET)
443+
set(CMAKE_REQUIRED_QUIET TRUE)
444+
check_source_compiles(C [[
445+
int main(void)
446+
{
447+
#if defined(__x86_64__) || defined(__i386__)
448+
__asm__ goto("jmp %l0\n" :::: end);
449+
#elif defined(__aarch64__)
450+
__asm__ goto("b %l0\n" :::: end);
451+
#endif
452+
end:
453+
return 0;
454+
}
455+
]] HAVE_ASM_GOTO)
456+
cmake_pop_check_state()
457+
if(HAVE_ASM_GOTO)
458+
message(CHECK_PASS "yes")
459+
else()
460+
message(CHECK_FAIL "no")
461+
endif()
462+
441463
message(CHECK_START "Checking whether __cpuid_count is available")
442464
cmake_push_check_state(RESET)
443465
set(CMAKE_REQUIRED_QUIET TRUE)

cmake/Zend/zend_config.cmake.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
/* Define to 1 if _FPU_SETCW is present and usable. */
88
#cmakedefine HAVE__FPU_SETCW 1
99

10+
/* Define to 1 if asm goto support is available. */
11+
#cmakedefine HAVE_ASM_GOTO 1
12+
1013
/* Define to 1 if '__cpuid_count' is available. */
1114
#cmakedefine HAVE_CPUID_COUNT 1
1215

cmake/cmake/ConfigureChecks.cmake

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -247,29 +247,6 @@ php_check_builtin(__builtin_usub_overflow PHP_HAVE_BUILTIN_USUB_OVERFLOW)
247247
# Check AVX-512 extensions.
248248
include(PHP/CheckAVX512)
249249

250-
# Check for asm goto.
251-
message(CHECK_START "Checking for asm goto support")
252-
cmake_push_check_state(RESET)
253-
set(CMAKE_REQUIRED_QUIET TRUE)
254-
check_source_compiles(C [[
255-
int main(void)
256-
{
257-
#if defined(__x86_64__) || defined(__i386__)
258-
__asm__ goto("jmp %l0\n" :::: end);
259-
#elif defined(__aarch64__)
260-
__asm__ goto("b %l0\n" :::: end);
261-
#endif
262-
end:
263-
return 0;
264-
}
265-
]] HAVE_ASM_GOTO)
266-
cmake_pop_check_state()
267-
if(HAVE_ASM_GOTO)
268-
message(CHECK_PASS "yes")
269-
else()
270-
message(CHECK_FAIL "no")
271-
endif()
272-
273250
################################################################################
274251
# Check functions.
275252
################################################################################
@@ -469,35 +446,6 @@ endif()
469446
# Check how flush should be called.
470447
include(PHP/CheckFlushIo)
471448

472-
# Check for aarch64 CRC32 API.
473-
message(CHECK_START "Checking for aarch64 CRC32 API availability")
474-
cmake_push_check_state(RESET)
475-
set(CMAKE_REQUIRED_QUIET TRUE)
476-
check_source_compiles(C [[
477-
#include <arm_acle.h>
478-
# if defined(__GNUC__)
479-
# if!defined(__clang__)
480-
# pragma GCC push_options
481-
# pragma GCC target ("+nothing+crc")
482-
# elif defined(__APPLE__)
483-
# pragma clang attribute push(__attribute__((target("crc"))), apply_to=function)
484-
# else
485-
# pragma clang attribute push(__attribute__((target("+nothing+crc"))), apply_to=function)
486-
# endif
487-
# endif
488-
int main(void)
489-
{
490-
__crc32d(0, 0);
491-
return 0;
492-
}
493-
]] HAVE_AARCH64_CRC32)
494-
cmake_pop_check_state()
495-
if(HAVE_AARCH64_CRC32)
496-
message(CHECK_PASS "yes")
497-
else()
498-
message(CHECK_FAIL "no")
499-
endif()
500-
501449
if(HAVE_ALLOCA_H)
502450
# Most *.nix systems.
503451
check_symbol_exists(alloca "alloca.h" HAVE_ALLOCA)

cmake/ext/standard/CMakeLists.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,35 @@ include(cmake/CheckFnmatch.cmake)
279279
# Check strptime().
280280
include(cmake/CheckStrptime.cmake)
281281

282+
# Check for aarch64 CRC32 API.
283+
message(CHECK_START "Checking for aarch64 CRC32 API availability")
284+
cmake_push_check_state(RESET)
285+
set(CMAKE_REQUIRED_QUIET TRUE)
286+
check_source_compiles(C [[
287+
#include <arm_acle.h>
288+
# if defined(__GNUC__)
289+
# if!defined(__clang__)
290+
# pragma GCC push_options
291+
# pragma GCC target ("+nothing+crc")
292+
# elif defined(__APPLE__)
293+
# pragma clang attribute push(__attribute__((target("crc"))), apply_to=function)
294+
# else
295+
# pragma clang attribute push(__attribute__((target("+nothing+crc"))), apply_to=function)
296+
# endif
297+
# endif
298+
int main(void)
299+
{
300+
__crc32d(0, 0);
301+
return 0;
302+
}
303+
]] HAVE_AARCH64_CRC32)
304+
cmake_pop_check_state()
305+
if(HAVE_AARCH64_CRC32)
306+
message(CHECK_PASS "yes")
307+
else()
308+
message(CHECK_FAIL "no")
309+
endif()
310+
282311
# Check if there is a support means of creating a new process and defining which
283312
# handles it receives.
284313
message(CHECK_START "Checking if OS can spawn processes with inherited handles")

cmake/ext/standard/config.cmake.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
/* Define to 1 to enable the 'chroot' function. */
1111
#cmakedefine ENABLE_CHROOT_FUNC 1
1212

13+
/* Define to 1 when aarch64 CRC32 API is available. */
14+
#cmakedefine HAVE_AARCH64_CRC32 1
15+
1316
/* Define to 1 if the system has the 'libargon2' library. */
1417
#cmakedefine HAVE_ARGON2LIB 1
1518

cmake/main/php_config.cmake.h.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@
4848
and to string "0" if they are not. */
4949
#define DEFAULT_SHORT_OPEN_TAG "@DEFAULT_SHORT_OPEN_TAG@"
5050

51-
/* Define to 1 when aarch64 CRC32 API is available. */
52-
#cmakedefine HAVE_AARCH64_CRC32 1
53-
5451
/* Define to 1 if the compiler supports '__alignof__'. */
5552
#cmakedefine HAVE_ALIGNOF 1
5653

@@ -72,9 +69,6 @@
7269
/* Define to 1 if you have the 'asctime_r' function. */
7370
#cmakedefine HAVE_ASCTIME_R 1
7471

75-
/* Define to 1 if asm goto support is available. */
76-
#cmakedefine HAVE_ASM_GOTO 1
77-
7872
/* Define to 1 if you have the 'asprintf' function. */
7973
#cmakedefine HAVE_ASPRINTF 1
8074

0 commit comments

Comments
 (0)