com php-src: Fix ZEND_SIGNED_MULTIPLY_LONG for AArch 64: Zend/zend_multiply.h
| From: | Nikita Popov | Date: | Sat, 02 Dec 2017 17:10:17 +0000 |
| Subject: | com php-src: Fix ZEND_SIGNED_MULTIPLY_LONG for AArch 64: Zend/zend_multiply.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100470@lists.php.net to get a copy of this message | ||
Commit: d6d4f2a9b38cd7fa7e938142e49e5a514d612e52
Author: Andy Postnikov <apostnikov@gmail.com> Sat, 10 Dec 2016 23:51:17 +0300
Committer: Nikita Popov <nikita.ppv@gmail.com> Sat, 2 Dec 2017 18:10:17 +0100
Parents: 958fdc997cd1fe3c6ff654ac470ba66768bdf214
Branches: PHP-7..0 PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d6d4f2a9b38cd7fa7e938142e49e5a514d612e52
Log:
Fix ZEND_SIGNED_MULTIPLY_LONG for AArch64
Register operands are required in this context.
This is a backport of 8c8679207ae5ada8751288e75b78c928a4d34d1d
to PHP 7.0+. The current code caused incorrect behavior on AArch64
when compiling with clang.
Changed paths:
M Zend/zend_multiply.h
Diff:
diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h
index e156d33..c66e192 100644
--- a/Zend/zend_multiply.h
+++ b/Zend/zend_multiply.h
@@ -53,8 +53,8 @@
__asm__("mul %0, %2, %3\n" \
"smulh %1, %2, %3\n" \
"sub %1, %1, %0, asr #63\n" \
- : "=X"(__tmpvar), "=X"(usedval) \
- : "X"(a), "X"(b)); \
+ : "=&r"(__tmpvar), "=&r"(usedval) \
+ : "r"(a), "r"(b)); \
if (usedval) (dval) = (double) (a) * (double) (b); \
else (lval) = __tmpvar; \
} while (0)