From 20548ab506d9e4285706709d364ebaed23895da8 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 10 Apr 2019 02:06:51 +0300 Subject: [PATCH] Removed too strict register allocation constraint. --- ext/opcache/jit/zend_jit_x86.dasc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 0df4ae82c8..a988ea2ca2 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -10000,9 +10000,10 @@ static zend_bool zend_jit_opline_supports_reg(zend_op_array *op_array, zend_ssa case ZEND_MUL: op1_info = OP1_INFO(); op2_info = OP2_INFO(); - return - !(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE))) && - !(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE))); + if ((op1_info | op2_info) & MAY_BE_UNDEF) { + return 0; + } + return (op1_info & op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) != 0; case ZEND_BW_OR: case ZEND_BW_AND: case ZEND_BW_XOR: @@ -10011,9 +10012,10 @@ static zend_bool zend_jit_opline_supports_reg(zend_op_array *op_array, zend_ssa case ZEND_MOD: op1_info = OP1_INFO(); op2_info = OP2_INFO(); - return - !(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-MAY_BE_LONG)) && - !(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-MAY_BE_LONG)); + if ((op1_info | op2_info) & MAY_BE_UNDEF) { + return 0; + } + return (op1_info & op2_info & MAY_BE_LONG) != 0; case ZEND_PRE_INC: case ZEND_PRE_DEC: case ZEND_POST_INC: @@ -10021,8 +10023,7 @@ static zend_bool zend_jit_opline_supports_reg(zend_op_array *op_array, zend_ssa op1_info = OP1_INFO(); return opline->op1_type == IS_CV && - (op1_info & MAY_BE_LONG) && - !(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE))); + (op1_info & MAY_BE_LONG); case ZEND_BOOL: case ZEND_BOOL_NOT: case ZEND_JMPZ: @@ -10030,9 +10031,7 @@ static zend_bool zend_jit_opline_supports_reg(zend_op_array *op_array, zend_ssa case ZEND_JMPZNZ: case ZEND_JMPZ_EX: case ZEND_JMPNZ_EX: - op1_info = OP1_INFO(); - return - !(op1_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))); + return 1; } return 0; } -- 2.49.0