Skip to content

Commit 4522dcb

Browse files
committed
JIT/x86: disable register allocation for expected ++/-- overflow case.
This fixes ext/opcache/tests/jit/inc_021.phpt with tracing JIT.
1 parent 4030a00 commit 4522dcb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15389,7 +15389,10 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1538915389
case ZEND_POST_INC:
1539015390
case ZEND_POST_DEC:
1539115391
op1_info = OP1_INFO();
15392-
return opline->op1_type == IS_CV && !(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - MAY_BE_LONG));
15392+
op2_info = OP1_DEF_INFO();
15393+
return opline->op1_type == IS_CV
15394+
&& !(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - MAY_BE_LONG))
15395+
&& (op2_info & MAY_BE_LONG);
1539315396
case ZEND_BOOL:
1539415397
case ZEND_BOOL_NOT:
1539515398
case ZEND_JMPZ:

0 commit comments

Comments
 (0)