Commit a1cb5a37c0f for php
commit a1cb5a37c0f048128ebe9784fda8fc279a317e61
Author: Marc <m@pyc.ac>
Date: Thu Sep 24 15:33:28 2026 +0200
fix aarch64 gcc preserve_none detection (#23883)
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 6353ea2ec7a..1f4e5e26f00 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -513,7 +513,7 @@ uintptr_t __attribute__((preserve_none,noinline,used)) fun(uintptr_t a, uintptr_
return (uintptr_t)const3;
}
-uintptr_t __attribute__((preserve_none)) test(void) {
+uintptr_t __attribute__((preserve_none,noinline)) test(void) {
uintptr_t ret;
#if defined(__x86_64__)
@@ -531,7 +531,7 @@ uintptr_t __attribute__((preserve_none)) test(void) {
#endif
: "=a" (ret)
: "r" (const1), "r" (const2), "r" (key)
- : "r12", "r13"
+ : "r12", "r13", "memory", "cc"
);
#elif defined(__aarch64__)
__asm__ __volatile__(
@@ -547,7 +547,7 @@ uintptr_t __attribute__((preserve_none)) test(void) {
"mov %0, x0\n"
: "=r" (ret)
: "r" (const1), "r" (const2), "r" (key)
- : "x0", "x21", "x22", "x30"
+ : "x0", "x20", "x21", "x30", "memory", "cc"
);
#else
# error