Skip to content

Commit 56dd321

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: Fix GH-20546: Zend preserve_none attribute config check on macOs issue.
2 parents 509cb06 + 1787765 commit 56dd321

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Zend/Zend.m4

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ dnl expectations.
474474
dnl
475475
AC_DEFUN([ZEND_CHECK_PRESERVE_NONE], [dnl
476476
AC_CACHE_CHECK([for preserve_none calling convention],
477-
[php_cv_preverve_none],
477+
[php_cv_preserve_none],
478478
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
479479
#include <stdio.h>
480480
#include <stdint.h>
@@ -504,7 +504,11 @@ uintptr_t __attribute__((preserve_none)) test(void) {
504504
"movq %2, %%r13\n"
505505
"xorq %3, %%r13\n"
506506
"xorq %%rax, %%rax\n"
507+
#if defined(__APPLE__)
508+
"call _fun\n"
509+
#else
507510
"call fun\n"
511+
#endif
508512
: "=a" (ret)
509513
: "r" (const1), "r" (const2), "r" (key)
510514
: "r12", "r13"
@@ -515,7 +519,11 @@ uintptr_t __attribute__((preserve_none)) test(void) {
515519
"eor x20, %1, %3\n"
516520
"eor x21, %2, %3\n"
517521
"eor x0, x0, x0\n"
522+
#if defined(__APPLE__)
523+
"bl _fun\n"
524+
#else
518525
"bl fun\n"
526+
#endif
519527
"mov %0, x0\n"
520528
: "=r" (ret)
521529
: "r" (const1), "r" (const2), "r" (key)

0 commit comments

Comments
 (0)