Skip to content

Commit 1fb9f5f

Browse files
committed
Revert "Fix edge cases in JIT for ASSIGN_DIM_OP."
This reverts commit 4744dc8. This seems to have broken some tests in sapi/fpm, and also causes the test runner to get killed.
1 parent e4e9650 commit 1fb9f5f

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6104,6 +6104,7 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
61046104
| LOAD_ADDR CARG3, binary_op
61056105
| SET_EX_OPLINE opline, REG0
61066106
| EXT_CALL zend_jit_assign_op_to_typed_ref, REG0
6107+
zend_jit_check_exception(Dst);
61076108
| b >9
61086109
|.code
61096110
|1:
@@ -6170,34 +6171,18 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
61706171
| LOAD_ZVAL_ADDR CARG3, op3_addr
61716172
| LOAD_ADDR CARG4, binary_op
61726173
| EXT_CALL zend_jit_assign_dim_op_helper, REG0
6174+
if (!zend_jit_check_exception(Dst)) {
6175+
return 0;
6176+
}
61736177

61746178
if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_ARRAY)) {
61756179
| b >9 // END
61766180
|.code
61776181
}
61786182
}
61796183

6180-
if ((op1_info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == MAY_BE_ARRAY
6181-
&& (op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_STRING))) == 0
6182-
&& (op1_data_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_DOUBLE))) == 0) {
6183-
|.cold_code
6184-
}
6185-
61866184
|9:
6187-
| FREE_OP (opline+1)->op1_type, (opline+1)->op1, op1_data_info, 0, opline, ZREG_TMP1, ZREG_TMP2
61886185
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline, ZREG_TMP1, ZREG_TMP2
6189-
if (may_throw) {
6190-
zend_jit_check_exception(Dst);
6191-
}
6192-
6193-
if ((op1_info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == MAY_BE_ARRAY
6194-
&& (op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_STRING))) == 0
6195-
&& (op1_data_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_DOUBLE))) == 0) {
6196-
| b >9
6197-
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline, ZREG_TMP1, ZREG_TMP2
6198-
|.code
6199-
|9:
6200-
}
62016186

62026187
return 1;
62036188
}

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6558,6 +6558,7 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
65586558
|.if not(X64)
65596559
| add r4, 12
65606560
|.endif
6561+
zend_jit_check_exception(Dst);
65616562
| jmp >9
65626563
|.code
65636564
|1:
@@ -6633,34 +6634,18 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
66336634
|.if not(X64)
66346635
| add r4, 8
66356636
|.endif
6637+
if (!zend_jit_check_exception(Dst)) {
6638+
return 0;
6639+
}
66366640

66376641
if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_ARRAY)) {
66386642
| jmp >9 // END
66396643
|.code
66406644
}
66416645
}
66426646

6643-
if ((op1_info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == MAY_BE_ARRAY
6644-
&& (op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_STRING))) == 0
6645-
&& (op1_data_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_DOUBLE))) == 0) {
6646-
|.cold_code
6647-
}
6648-
66496647
|9:
6650-
| FREE_OP (opline+1)->op1_type, (opline+1)->op1, op1_data_info, 0, opline
66516648
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline
6652-
if (may_throw) {
6653-
zend_jit_check_exception(Dst);
6654-
}
6655-
6656-
if ((op1_info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == MAY_BE_ARRAY
6657-
&& (op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_STRING))) == 0
6658-
&& (op1_data_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_DOUBLE))) == 0) {
6659-
| jmp >9
6660-
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline
6661-
|.code
6662-
|9:
6663-
}
66646649

66656650
return 1;
66666651
}

0 commit comments

Comments
 (0)