Skip to content

Commit d6d4f2a

Browse files
andypostnikic
authored andcommitted
Fix ZEND_SIGNED_MULTIPLY_LONG for AArch64
Register operands are required in this context. This is a backport of 8c86792 to PHP 7.0+. The current code caused incorrect behavior on AArch64 when compiling with clang.
1 parent 958fdc9 commit d6d4f2a

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
@@ -53,8 +53,8 @@
5353
__asm__("mul %0, %2, %3\n" \
5454
"smulh %1, %2, %3\n" \
5555
"sub %1, %1, %0, asr #63\n" \
56-
: "=X"(__tmpvar), "=X"(usedval) \
57-
: "X"(a), "X"(b)); \
56+
: "=&r"(__tmpvar), "=&r"(usedval) \
57+
: "r"(a), "r"(b)); \
5858
if (usedval) (dval) = (double) (a) * (double) (b); \
5959
else (lval) = __tmpvar; \
6060
} while (0)

0 commit comments

Comments
 (0)