@@ -4659,7 +4659,7 @@ static int zend_jit_math_helper(dasm_State **Dst,
46594659{
46604660 zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr);
46614661
4662- if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG)) {
4662+ if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG) && (res_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) ) {
46634663 if (op1_info & (MAY_BE_ANY-MAY_BE_LONG)) {
46644664 if (op1_info & MAY_BE_DOUBLE) {
46654665 | IF_NOT_ZVAL_TYPE op1_addr, IS_LONG, >3
@@ -4720,7 +4720,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
47204720 }
47214721 } else if ((op1_info & MAY_BE_DOUBLE) &&
47224722 !(op1_info & MAY_BE_LONG) &&
4723- (op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE))) {
4723+ (op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) &&
4724+ (res_info & MAY_BE_DOUBLE)) {
47244725 if (op1_info & (MAY_BE_ANY-MAY_BE_DOUBLE)) {
47254726 | IF_NOT_ZVAL_TYPE op1_addr, IS_DOUBLE, >6
47264727 }
@@ -4754,7 +4755,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
47544755 }
47554756 } else if ((op2_info & MAY_BE_DOUBLE) &&
47564757 !(op2_info & MAY_BE_LONG) &&
4757- (op1_info & (MAY_BE_LONG|MAY_BE_DOUBLE))) {
4758+ (op1_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) &&
4759+ (res_info & MAY_BE_DOUBLE)) {
47584760 if (op2_info & (MAY_BE_ANY-MAY_BE_DOUBLE)) {
47594761 | IF_NOT_ZVAL_TYPE op2_addr, IS_DOUBLE, >6
47604762 }
@@ -4793,7 +4795,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
47934795 if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE))) ||
47944796 (op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE)))) {
47954797 if ((op1_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) &&
4796- (op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE))) {
4798+ (op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) &&
4799+ (res_info & (MAY_BE_LONG|MAY_BE_DOUBLE))) {
47974800 |.cold_code
47984801 }
47994802 |6:
@@ -4855,7 +4858,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
48554858 }
48564859 }
48574860 if ((op1_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) &&
4858- (op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE))) {
4861+ (op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) &&
4862+ (res_info & (MAY_BE_LONG|MAY_BE_DOUBLE))) {
48594863 | jmp <5
48604864 |.code
48614865 }
0 commit comments