summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2013-07-03 17:53:46 -0400
committerNuno Lopes <nlopess@php.net>2013-07-03 17:56:02 -0400
commitc652cc93ec5ce8f1833d023159804ebd56e1a94e (patch)
tree65a9c31c48909b717aa96b0e4851fcd0d64dedfb /Zend/zend_alloc.c
parent7549beb1022c6821a279df03e0dfcbf0df5eef97 (diff)
downloadphp-git-c652cc93ec5ce8f1833d023159804ebd56e1a94e.tar.gz
fix assembly of safe_address() for x86 and x86_64
Diffstat (limited to 'Zend/zend_alloc.c')
-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 0bbd59a357..596c2498bc 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2461,7 +2461,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),
@@ -2489,7 +2489,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),