@@ -17058,11 +17058,15 @@ static int zend_jit_trace_handler(zend_jit_ctx *jit, const zend_op_array *op_arr
1705817058 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(handler), jit_FP(jit), jit_IP(jit));
1705917059 if (opline->opcode == ZEND_RETURN ||
1706017060 opline->opcode == ZEND_RETURN_BY_REF ||
17061+ opline->opcode == ZEND_DO_UCALL ||
17062+ opline->opcode == ZEND_DO_FCALL_BY_NAME ||
17063+ opline->opcode == ZEND_DO_FCALL ||
1706117064 opline->opcode == ZEND_GENERATOR_CREATE) {
17062- // TODO: what other ops need this?
17063- ref = ir_AND_A(ref, ir_CONST_ADDR(~ZEND_VM_ENTER_BIT));
17065+
17066+ jit_LOAD_IP(jit, ir_AND_A(ref, ir_CONST_ADDR(~ZEND_VM_ENTER_BIT)));
17067+ } else {
17068+ jit_LOAD_IP(jit, ref);
1706417069 }
17065- jit_LOAD_IP(jit, ref);
1706617070 }
1706717071 if (may_throw
1706817072 && opline->opcode != ZEND_RETURN
@@ -17102,10 +17106,8 @@ static int zend_jit_trace_handler(zend_jit_ctx *jit, const zend_op_array *op_arr
1710217106 ir_GUARD(ir_NE(jit_IP(jit), ir_CONST_ADDR(zend_jit_halt_op)),
1710317107 jit_STUB_ADDR(jit, jit_stub_trace_halt));
1710417108 }
17105- } else if (GCC_GLOBAL_REGS) {
17106- ir_GUARD(jit_IP(jit), jit_STUB_ADDR(jit, jit_stub_trace_halt));
1710717109 } else {
17108- // TODO: check
17110+ /* IP has been cleared of ZEND_VM_ENTER_BIT already */
1710917111 ir_GUARD(jit_IP(jit), jit_STUB_ADDR(jit, jit_stub_trace_halt));
1711017112 }
1711117113 } else if (opline->opcode == ZEND_GENERATOR_RETURN ||
0 commit comments