com php-src: fix assembly of safe_address() for x8 6 and x86_64: Zend/zend_alloc.c
| From: | Nuno Lopes | Date: | Wed, 03 Jul 2013 21:53:46 +0000 |
| Subject: | com php-src: fix assembly of safe_address() for x8 6 and x86_64: Zend/zend_alloc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72581@lists.php.net to get a copy of this message | ||
Commit: 97e9d01dc78b6cec8eb014484935c2d1ab8293fc
Author: Nuno Lopes <nlopess@php.net> Wed, 3 Jul 2013 17:53:46 -0400
Parents: 675beb06a6ed8040303f21f55e4ce6d350f75a1a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=97e9d01dc78b6cec8eb014484935c2d1ab8293fc
Log:
fix assembly of safe_address() for x86 and x86_64
Changed paths:
M Zend/zend_alloc.c
Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index c6aee57..383a1df 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),