Skip to content

Commit 23429b5

Browse files
committed
Fixed incorrect register allocation
1 parent bfa8e42 commit 23429b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15185,6 +15185,9 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend
1518515185
if (!(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE))) &&
1518615186
!(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE)))) {
1518715187
regset = ZEND_REGSET_EMPTY;
15188+
if (!(opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ))) {
15189+
ZEND_REGSET_INCL(regset, ZREG_R0);
15190+
}
1518815191
if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG) &&
1518915192
opline->op1_type != IS_CONST && opline->op2_type != IS_CONST) {
1519015193
if (ssa_op->op1_use != current_var &&

0 commit comments

Comments
 (0)