summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2013-07-03 18:02:28 -0400
committerJohannes Schlüter <johannes@php.net>2013-07-10 19:39:52 +0200
commit55c279ed3fd6de8ce4d9d16d98ae7bce1a8b73fa (patch)
tree249820a2a0469d86f237d0d75fd7b981e1c21b01
parent825bd97c6840bb8464a330142751600c093e8b8a (diff)
downloadphp-git-55c279ed3fd6de8ce4d9d16d98ae7bce1a8b73fa.tar.gz
fix assembly of safe_address() for x86 and x86_64
-rw-r--r--Zend/zend_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 02e84ee1e6..e86b3e7c58 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2386,7 +2386,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),
@@ -2406,7 +2406,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__ ("mulq %3\n\taddq %4,%0\n\tadcq %1,%1"
+ __asm__ ("mulq %3\n\taddq %4,%0\n\tadcq $0,%1"
: "=&a"(res), "=&d" (overflow)
: "%0"(res),
"rm"(size),