Skip to content

Commit 438baf4

Browse files
shivammathurgithub-actions[bot]
authored andcommitted
Fix ZEND_SIGNED_MULTIPLY_LONG for AArch64
Register operands are required in this context. This is a backport of 8c86792 to PHP 5.6. The current code caused incorrect behavior on AArch64 when compiling with clang.
1 parent fbbf9e5 commit 438baf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_multiply.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
__asm__("mul %0, %2, %3\n" \
6363
"smulh %1, %2, %3\n" \
6464
"sub %1, %1, %0, asr #63\n" \
65-
: "=X"(__tmpvar), "=X"(usedval) \
66-
: "X"(a), "X"(b)); \
65+
: "=&r"(__tmpvar), "=&r"(usedval) \
66+
: "r"(a), "r"(b)); \
6767
if (usedval) (dval) = (double) (a) * (double) (b); \
6868
else (lval) = __tmpvar; \
6969
} while (0)

0 commit comments

Comments
 (0)