@@ -2149,6 +2149,7 @@ static int zend_jit_undefined_function_stub(dasm_State **Dst)
2149
2149
static int zend_jit_negative_shift_stub(dasm_State **Dst)
2150
2150
{
2151
2151
|->negative_shift:
2152
+ | mov RX, EX->opline
2152
2153
| UNDEF_OPLINE_RESULT_IF_USED
2153
2154
|.if X64
2154
2155
|.if WIN
@@ -2171,13 +2172,26 @@ static int zend_jit_negative_shift_stub(dasm_State **Dst)
2171
2172
| EXT_CALL zend_throw_error, r0
2172
2173
| add r4, 16
2173
2174
|.endif
2175
+ | test byte OP:RX->op1_type, (IS_TMP_VAR|IS_VAR)
2176
+ | je >9
2177
+ | mov eax, dword OP:RX->op1.var
2178
+ | add r0, FP
2179
+ | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_R0, 0), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF, 0, 0, NULL
2180
+ |9:
2181
+ | test byte OP:RX->op2_type, (IS_TMP_VAR|IS_VAR)
2182
+ | je >9
2183
+ | mov eax, dword OP:RX->op2.var
2184
+ | add r0, FP
2185
+ | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_R0, 0), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF, 0, 0, NULL
2186
+ |9:
2174
2187
| jmp ->exception_handler
2175
2188
return 1;
2176
2189
}
2177
2190
2178
2191
static int zend_jit_mod_by_zero_stub(dasm_State **Dst)
2179
2192
{
2180
2193
|->mod_by_zero:
2194
+ | mov RX, EX->opline
2181
2195
| UNDEF_OPLINE_RESULT_IF_USED
2182
2196
|.if X64
2183
2197
|.if WIN
@@ -2200,6 +2214,18 @@ static int zend_jit_mod_by_zero_stub(dasm_State **Dst)
2200
2214
| EXT_CALL zend_throw_error, r0
2201
2215
| add r4, 16
2202
2216
|.endif
2217
+ | test byte OP:RX->op1_type, (IS_TMP_VAR|IS_VAR)
2218
+ | je >9
2219
+ | mov eax, dword OP:RX->op1.var
2220
+ | add r0, FP
2221
+ | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_R0, 0), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF, 0, 0, NULL
2222
+ |9:
2223
+ | test byte OP:RX->op2_type, (IS_TMP_VAR|IS_VAR)
2224
+ | je >9
2225
+ | mov eax, dword OP:RX->op2.var
2226
+ | add r0, FP
2227
+ | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_R0, 0), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF, 0, 0, NULL
2228
+ |9:
2203
2229
| jmp ->exception_handler
2204
2230
return 1;
2205
2231
}
0 commit comments