From: Nuno Lopes Date: Wed, 3 Jul 2013 21:53:46 +0000 (-0400) Subject: fix assembly of safe_address() for x86 and x86_64 X-Git-Tag: php-5.5.2RC1~17^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40cbceaf71f3431b43c245704d82f06c8bb4c2de;p=php fix assembly of safe_address() for x86 and x86_64 --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index c6aee57a73..383a1dfcab 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2465,7 +2465,7 @@ static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) size_t res = nmemb; unsigned long overflow = 0; - __asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1" + __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1" : "=&a"(res), "=&d" (overflow) : "%0"(res), "rm"(size), @@ -2493,7 +2493,7 @@ static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) __asm__ ("mul" LP_SUFF " %3\n\t" "add %4,%0\n\t" - "adc %1,%1" + "adc $0,%1" : "=&a"(res), "=&d" (overflow) : "%0"(res), "rm"(size),