version 1.1.1.3, 2013/07/22 01:32:16
|
version 1.1.1.4, 2014/06/15 20:04:04
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Zend Engine | |
| Zend Engine | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) | | | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 2.00 of the Zend license, | |
| This source file is subject to version 2.00 of the Zend license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 593 static zend_always_inline int fast_add_function(zval *
|
Line 593 static zend_always_inline int fast_add_function(zval *
|
"r"(op2) |
"r"(op2) |
: "rax"); |
: "rax"); |
#else |
#else |
Z_LVAL_P(result) = Z_LVAL_P(op1) + Z_LVAL_P(op2); | /* |
| * 'result' may alias with op1 or op2, so we need to |
| * ensure that 'result' is not updated until after we |
| * have read the values of op1 and op2. |
| */ |
|
|
if (UNEXPECTED((Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK) |
if (UNEXPECTED((Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK) |
&& (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(result) & LONG_SIGN_MASK))) { | && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != ((Z_LVAL_P(op1) + Z_LVAL_P(op2)) & LONG_SIGN_MASK))) { |
Z_DVAL_P(result) = (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2); |
Z_DVAL_P(result) = (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2); |
Z_TYPE_P(result) = IS_DOUBLE; |
Z_TYPE_P(result) = IS_DOUBLE; |
} else { |
} else { |
|
Z_LVAL_P(result) = Z_LVAL_P(op1) + Z_LVAL_P(op2); |
Z_TYPE_P(result) = IS_LONG; |
Z_TYPE_P(result) = IS_LONG; |
} |
} |
#endif |
#endif |
Line 736 static zend_always_inline int fast_mul_function(zval *
|
Line 741 static zend_always_inline int fast_mul_function(zval *
|
|
|
static zend_always_inline int fast_div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) |
static zend_always_inline int fast_div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) |
{ |
{ |
|
#if 0 |
if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && 0) { |
if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && 0) { |
if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { |
if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { |
if (UNEXPECTED(Z_LVAL_P(op2) == 0)) { |
if (UNEXPECTED(Z_LVAL_P(op2) == 0)) { |
Line 790 static zend_always_inline int fast_div_function(zval *
|
Line 796 static zend_always_inline int fast_div_function(zval *
|
return SUCCESS; |
return SUCCESS; |
} |
} |
} |
} |
|
#endif |
return div_function(result, op1, op2 TSRMLS_CC); |
return div_function(result, op1, op2 TSRMLS_CC); |
} |
} |
|
|