1 --- php-5.4.41/Zend/zend_operators.h 2015-05-12 19:38:38.000000000 +0000
2 +++ php-5.5.25/Zend/zend_operators.h 2015-05-14 00:02:08.000000000 +0000
4 +----------------------------------------------------------------------+
6 +----------------------------------------------------------------------+
7 - | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
8 + | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
9 +----------------------------------------------------------------------+
10 | This source file is subject to version 2.00 of the Zend license, |
11 | that is bundled with this package in the file LICENSE, and is |
24 #define zend_update_current_locale()
27 +/* The offset in bytes between the value and type fields of a zval */
28 +#define ZVAL_OFFSETOF_TYPE \
29 + (offsetof(zval,type) - offsetof(zval,value))
31 static zend_always_inline int fast_increment_function(zval *op1)
33 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
37 "movl $0x41e00000, 0x4(%0)\n\t"
38 - "movb $0x2,0xc(%0)\n"
39 + "movb %1, %c2(%0)\n"
45 + "n"(ZVAL_OFFSETOF_TYPE)
47 #elif defined(__GNUC__) && defined(__x86_64__)
52 "movl $0x43e00000, 0x4(%0)\n\t"
53 - "movb $0x2,0x14(%0)\n"
54 + "movb %1, %c2(%0)\n"
60 + "n"(ZVAL_OFFSETOF_TYPE)
63 if (UNEXPECTED(Z_LVAL_P(op1) == LONG_MAX)) {
64 /* switch to double */
67 "movl $0x00200000, (%0)\n\t"
68 "movl $0xc1e00000, 0x4(%0)\n\t"
69 - "movb $0x2,0xc(%0)\n"
76 + "n"(ZVAL_OFFSETOF_TYPE)
78 #elif defined(__GNUC__) && defined(__x86_64__)
82 "movl $0x00000000, (%0)\n\t"
83 "movl $0xc3e00000, 0x4(%0)\n\t"
84 - "movb $0x2,0x14(%0)\n"
91 + "n"(ZVAL_OFFSETOF_TYPE)
94 if (UNEXPECTED(Z_LVAL_P(op1) == LONG_MIN)) {
95 /* switch to double */
97 "addl (%2), %%eax\n\t"
99 "movl %%eax, (%0)\n\t"
100 - "movb $0x1,0xc(%0)\n\t"
101 + "movb %3, %c5(%0)\n\t"
106 "faddp %%st, %%st(1)\n\t"
107 - "movb $0x2,0xc(%0)\n\t"
108 + "movb %4, %c5(%0)\n\t"
116 + : "r"(&result->value),
121 + "n"(ZVAL_OFFSETOF_TYPE)
123 #elif defined(__GNUC__) && defined(__x86_64__)
125 "movq (%1), %%rax\n\t"
126 "addq (%2), %%rax\n\t"
128 "movq %%rax, (%0)\n\t"
129 - "movb $0x1,0x14(%0)\n\t"
130 + "movb %3, %c5(%0)\n\t"
135 "faddp %%st, %%st(1)\n\t"
136 - "movb $0x2,0x14(%0)\n\t"
137 + "movb %4, %c5(%0)\n\t"
145 + : "r"(&result->value),
150 + "n"(ZVAL_OFFSETOF_TYPE)
154 * 'result' may alias with op1 or op2, so we need to
156 "subl (%2), %%eax\n\t"
158 "movl %%eax, (%0)\n\t"
159 - "movb $0x1,0xc(%0)\n\t"
160 + "movb %3, %c5(%0)\n\t"
164 @@ -648,21 +695,24 @@
166 "fsubp %%st, %%st(1)\n\t"
168 - "movb $0x2,0xc(%0)\n\t"
169 + "movb %4, %c5(%0)\n\t"
177 + : "r"(&result->value),
182 + "n"(ZVAL_OFFSETOF_TYPE)
184 #elif defined(__GNUC__) && defined(__x86_64__)
186 "movq (%1), %%rax\n\t"
187 "subq (%2), %%rax\n\t"
189 "movq %%rax, (%0)\n\t"
190 - "movb $0x1,0x14(%0)\n\t"
191 + "movb %3, %c5(%0)\n\t"
195 @@ -672,14 +722,17 @@
197 "fsubp %%st, %%st(1)\n\t"
199 - "movb $0x2,0x14(%0)\n\t"
200 + "movb %4, %c5(%0)\n\t"
208 + : "r"(&result->value),
213 + "n"(ZVAL_OFFSETOF_TYPE)
216 Z_LVAL_P(result) = Z_LVAL_P(op1) - Z_LVAL_P(op2);