Gmail ate my attachment the 1st time, trying Thunderbird instead ...
diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h index c3c9657..3053f8b 100644 --- a/Zend/zend_multiply.h +++ b/Zend/zend_multiply.h @@ -13,7 +13,7 @@ | lice...@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sascha Schumann <sas...@schumann.cx> | - | Ard Biesheuvel <a...@ard.nu> | + | Ard Biesheuvel <ard.biesheu...@linaro.org> | +----------------------------------------------------------------------+ */ @@ -43,6 +43,31 @@ else (lval) = __tmpvar; \ } while (0) +#elif defined(__arm__) && defined(__GNUC__) + +#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ + long __tmpvar; \ + __asm__("smull %0, %1, %2, %3\n" \ + "sub %1, %1, %0, asr #31\n" \ + : "=r"(__tmpvar), "=r"(usedval) \ + : "r"(a), "r"(b)); \ + if (usedval) (dval) = (double) (a) * (double) (b); \ + else (lval) = __tmpvar; \ +} while (0) + +#elif defined(__aarch64__) && defined(__GNUC__) + +#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ + long __tmpvar; \ + __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)); \ + if (usedval) (dval) = (double) (a) * (double) (b); \ + else (lval) = __tmpvar; \ +} while (0) + #elif SIZEOF_LONG == 4 && defined(HAVE_ZEND_LONG64) #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php