Skip to content

Commit

Permalink
fix assembly of safe_address() for x86 and x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Jul 3, 2013
1 parent 7549beb commit c652cc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit c652cc9

Please sign in to comment.