head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.08.29.02.43.37; author mef; state Exp; branches; next ; commitid juN7RFKl5n44JtTG; desc @@ 1.1 log @(lang/php56) fix build for aarch64, by importing php85 change. Not fully checked sorry @ text @$NetBSD$ https://mail-index.netbsd.org/pkgsrc-users/2026/08/28/msg043351.html Quick hack by importing from php85 --- Zend/zend_multiply.h.orig 2019-01-09 18:54:13.000000000 +0900 +++ Zend/zend_multiply.h 2026-08-29 09:48:42.223797552 +0900 @@@@ -56,14 +56,17 @@@@ } while (0) #elif defined(__aarch64__) && defined(__GNUC__) + +typedef int64_t zend_long; + #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ - long __tmpvar; \ + zend_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)); \ + : "=&r"(__tmpvar), "=&r"(usedval) \ + : "r"(a), "r"(b)); \ if (usedval) (dval) = (double) (a) * (double) (b); \ else (lval) = __tmpvar; \ } while (0) @