@@ -4659,7 +4659,7 @@ static int zend_jit_math_helper(dasm_State **Dst,
4659
4659
{
4660
4660
zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr);
4661
4661
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)) ) {
4663
4663
if (op1_info & (MAY_BE_ANY-MAY_BE_LONG)) {
4664
4664
if (op1_info & MAY_BE_DOUBLE) {
4665
4665
| IF_NOT_ZVAL_TYPE op1_addr, IS_LONG, >3
@@ -4720,7 +4720,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
4720
4720
}
4721
4721
} else if ((op1_info & MAY_BE_DOUBLE) &&
4722
4722
!(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)) {
4724
4725
if (op1_info & (MAY_BE_ANY-MAY_BE_DOUBLE)) {
4725
4726
| IF_NOT_ZVAL_TYPE op1_addr, IS_DOUBLE, >6
4726
4727
}
@@ -4754,7 +4755,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
4754
4755
}
4755
4756
} else if ((op2_info & MAY_BE_DOUBLE) &&
4756
4757
!(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)) {
4758
4760
if (op2_info & (MAY_BE_ANY-MAY_BE_DOUBLE)) {
4759
4761
| IF_NOT_ZVAL_TYPE op2_addr, IS_DOUBLE, >6
4760
4762
}
@@ -4793,7 +4795,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
4793
4795
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE))) ||
4794
4796
(op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_LONG|MAY_BE_DOUBLE)))) {
4795
4797
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))) {
4797
4800
|.cold_code
4798
4801
}
4799
4802
|6:
@@ -4855,7 +4858,8 @@ static int zend_jit_math_helper(dasm_State **Dst,
4855
4858
}
4856
4859
}
4857
4860
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))) {
4859
4863
| jmp <5
4860
4864
|.code
4861
4865
}
0 commit comments