Skip to content

Commit a1cb5a3

Browse files
authored
fix aarch64 gcc preserve_none detection (#23883)
1 parent 7e0b2e0 commit a1cb5a3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Zend/Zend.m4‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ uintptr_t __attribute__((preserve_none,noinline,used)) fun(uintptr_t a, uintptr_
513513
return (uintptr_t)const3;
514514
}
515515
516-
uintptr_t __attribute__((preserve_none)) test(void) {
516+
uintptr_t __attribute__((preserve_none,noinline)) test(void) {
517517
uintptr_t ret;
518518
519519
#if defined(__x86_64__)
@@ -531,7 +531,7 @@ uintptr_t __attribute__((preserve_none)) test(void) {
531531
#endif
532532
: "=a" (ret)
533533
: "r" (const1), "r" (const2), "r" (key)
534-
: "r12", "r13"
534+
: "r12", "r13", "memory", "cc"
535535
);
536536
#elif defined(__aarch64__)
537537
__asm__ __volatile__(
@@ -547,7 +547,7 @@ uintptr_t __attribute__((preserve_none)) test(void) {
547547
"mov %0, x0\n"
548548
: "=r" (ret)
549549
: "r" (const1), "r" (const2), "r" (key)
550-
: "x0", "x21", "x22", "x30"
550+
: "x0", "x20", "x21", "x30", "memory", "cc"
551551
);
552552
#else
553553
# error

0 commit comments

Comments
 (0)