Skip to content

Commit 572b799

Browse files
committed
Fixed register allocation constraints
1 parent f6455c5 commit 572b799

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11024,10 +11024,7 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen
1102411024
case ZEND_MUL:
1102511025
op1_info = OP1_INFO();
1102611026
op2_info = OP2_INFO();
11027-
if ((op1_info | op2_info) & MAY_BE_UNDEF) {
11028-
return 0;
11029-
}
11030-
return (op1_info & op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) != 0;
11027+
return !((op1_info | op2_info) & (MAY_BE_ANY - (MAY_BE_LONG|MAY_BE_DOUBLE)));
1103111028
case ZEND_BW_OR:
1103211029
case ZEND_BW_AND:
1103311030
case ZEND_BW_XOR:
@@ -11036,18 +11033,13 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen
1103611033
case ZEND_MOD:
1103711034
op1_info = OP1_INFO();
1103811035
op2_info = OP2_INFO();
11039-
if ((op1_info | op2_info) & MAY_BE_UNDEF) {
11040-
return 0;
11041-
}
11042-
return (op1_info & op2_info & MAY_BE_LONG) != 0;
11036+
return !((op1_info | op2_info) & (MAY_BE_ANY - MAY_BE_LONG));
1104311037
case ZEND_PRE_INC:
1104411038
case ZEND_PRE_DEC:
1104511039
case ZEND_POST_INC:
1104611040
case ZEND_POST_DEC:
1104711041
op1_info = OP1_INFO();
11048-
return
11049-
opline->op1_type == IS_CV &&
11050-
(op1_info & MAY_BE_LONG);
11042+
return opline->op1_type == IS_CV && !(op1_info & (MAY_BE_ANY - MAY_BE_LONG));
1105111043
case ZEND_BOOL:
1105211044
case ZEND_BOOL_NOT:
1105311045
case ZEND_JMPZ:

0 commit comments

Comments
 (0)