[php-src] PHP-8.6: fix aarch64 gcc preserve_none detection (#23883)
| From: | Marc via GitHub | Date: | Thu, 24 Sep 2026 13:33:32 +0000 |
| Subject: | [php-src] PHP-8.6: fix aarch64 gcc preserve_none detection (#23883) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141499@lists.php.net to get a copy of this message | ||
Author: Marc (henderkes)
Committer: GitHub (web-flow)
Pusher: arnaud-lb
Date: 2026-09-24T15:33:28+02:00
Commit: https://github.com/php/php-src/commit/a1cb5a37c0f048128ebe9784fda8fc279a317e61
Raw diff: https://github.com/php/php-src/commit/a1cb5a37c0f048128ebe9784fda8fc279a317e61.diff
fix aarch64 gcc preserve_none detection (#23883)
Changed paths:
M Zend/Zend.m4
Diff:
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 6353ea2ec7a8..1f4e5e26f00e 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