Grokbase Groups PHP php-cvs July 2013
FAQ
Commit: e964817b244d091dc38f59f5d7f1735110b698af
Author: Nuno Lopes <nlopess@php.net> Wed, 3 Jul 2013 18:02:28 -0400
Parents: 50ac53e1b109795e3abb92735a3a35cebcdd47a7
Branches: PHP-5.3

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e964817b244d091dc38f59f5d7f1735110b698af

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 02e84ee..e86b3e7 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),

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupphp-cvs @
categoriesphp
postedJul 3, '13 at 9:54p
activeJul 3, '13 at 10:02p
posts4
users1
websitephp.net

1 user in discussion

Nuno Lopes: 4 posts

People

Translate

site design / logo © 2017 Grokbase