diff options
-rw-r--r-- | ext/opcache/jit/zend_jit_trace.c | 18 | ||||
-rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 9eee964126..9c98f90bbe 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1562,7 +1562,9 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin case ZEND_FETCH_DIM_RW: // case ZEND_FETCH_DIM_UNSET: case ZEND_FETCH_LIST_W: - if (opline->op1_type != IS_CV) { + if (opline->op1_type != IS_CV + && (orig_op1_type == IS_UNKNOWN + || !(orig_op1_type & IS_TRACE_INDIRECT))) { break; } ADD_OP1_TRACE_GUARD(); @@ -4325,11 +4327,23 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par case ZEND_FETCH_DIM_RW: // case ZEND_FETCH_DIM_UNSET: case ZEND_FETCH_LIST_W: - if (opline->op1_type != IS_CV) { + if (opline->op1_type != IS_CV + && (orig_op1_type == IS_UNKNOWN + || !(orig_op1_type & IS_TRACE_INDIRECT))) { break; } op1_info = OP1_INFO(); op1_addr = OP1_REG_ADDR(); + if (opline->op1_type == IS_VAR) { + if (orig_op1_type != IS_UNKNOWN + && (orig_op1_type & IS_TRACE_INDIRECT)) { + if (!zend_jit_fetch_indirect_var(&dasm_state, opline, orig_op1_type, &op1_info, &op1_addr)) { + goto jit_failure; + } + } else { + break; + } + } if (orig_op1_type != IS_UNKNOWN && (orig_op1_type & IS_TRACE_REFERENCE)) { if (!zend_jit_fetch_reference(&dasm_state, opline, orig_op1_type, &op1_info, &op1_addr, diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 1962b23a47..6b1f6cf534 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -10960,8 +10960,6 @@ static int zend_jit_fetch_dim(dasm_State **Dst, { zend_jit_addr op2_addr; - ZEND_ASSERT(opline->op1_type == IS_CV); - op2_addr = (opline->op2_type != IS_UNUSED) ? OP2_ADDR() : 0; if (op1_info & MAY_BE_REF) { |