Skip to content

Commit c98e174

Browse files
committed
Minimal JIT support for JMP_NULL
1 parent 8b6b2bd commit c98e174

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,8 +2972,6 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
29722972
goto jit_failure;
29732973
}
29742974
goto done;
2975-
case ZEND_JMP_NULL:
2976-
goto jit_failure;
29772975
default:
29782976
break;
29792977
}
@@ -3062,6 +3060,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
30623060
case ZEND_JMPNZ_EX:
30633061
case ZEND_JMP_SET:
30643062
case ZEND_COALESCE:
3063+
case ZEND_JMP_NULL:
30653064
case ZEND_FE_RESET_R:
30663065
case ZEND_FE_RESET_RW:
30673066
case ZEND_ASSERT_CHECK:
@@ -3112,8 +3111,6 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
31123111
}
31133112
}
31143113
break;
3115-
case ZEND_JMP_NULL:
3116-
goto jit_failure;
31173114
default:
31183115
if (!zend_jit_handler(&dasm_state, opline,
31193116
zend_may_throw(opline, ssa_op, op_array, ssa))) {

ext/opcache/jit/zend_jit_trace.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ static int zend_jit_trace_may_exit(const zend_op_array *op_array, const zend_op
280280
case ZEND_JMPNZ_EX:
281281
case ZEND_JMP_SET:
282282
case ZEND_COALESCE:
283+
case ZEND_JMP_NULL:
283284
case ZEND_FE_RESET_R:
284285
case ZEND_FE_RESET_RW:
285286
case ZEND_ASSERT_CHECK:
@@ -4638,6 +4639,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
46384639
|| opline->opcode == ZEND_QM_ASSIGN
46394640
|| opline->opcode == ZEND_JMP_SET
46404641
|| opline->opcode == ZEND_COALESCE
4642+
|| opline->opcode == ZEND_JMP_NULL
46414643
|| opline->opcode == ZEND_FE_RESET_R) {
46424644
/* keep old value */
46434645
type = STACK_VAR_TYPE(opline->op1.var);

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,6 +3329,7 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra
33293329
case ZEND_JMPNZ_EX:
33303330
case ZEND_JMP_SET:
33313331
case ZEND_COALESCE:
3332+
case ZEND_JMP_NULL:
33323333
case ZEND_FE_RESET_R:
33333334
case ZEND_FE_RESET_RW:
33343335
exit_opline = (trace->opline == opline + 1) ?
@@ -8335,6 +8336,7 @@ static int zend_jit_needs_call_chain(zend_call_info *call_info, uint32_t b, cons
83358336
case ZEND_FE_RESET_RW:
83368337
case ZEND_JMP_SET:
83378338
case ZEND_COALESCE:
8339+
case ZEND_JMP_NULL:
83388340
case ZEND_ASSERT_CHECK:
83398341
case ZEND_CATCH:
83408342
case ZEND_DECLARE_ANON_CLASS:
@@ -8416,6 +8418,7 @@ static int zend_jit_needs_call_chain(zend_call_info *call_info, uint32_t b, cons
84168418
case ZEND_FE_RESET_RW:
84178419
case ZEND_JMP_SET:
84188420
case ZEND_COALESCE:
8421+
case ZEND_JMP_NULL:
84198422
case ZEND_ASSERT_CHECK:
84208423
case ZEND_CATCH:
84218424
case ZEND_DECLARE_ANON_CLASS:

0 commit comments

Comments
 (0)