mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
fix assembly of safe_address() for x86 and x86_64
This commit is contained in:
parent
7549beb102
commit
c652cc93ec
1 changed files with 2 additions and 2 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue