Lines Matching refs:ref
157 static void ir_refs_add(ir_refs *refs, ir_ref ref) in ir_refs_add() argument
163 ptr[refs->count++] = ref; in ir_refs_add()
264 ir_ref ref; member
470 ir_ref ref = jit->ctx.control; in jit_TLS() local
473 if (ref == jit->tls) { in jit_TLS()
476 insn = &jit->ctx.ir_base[ref]; in jit_TLS()
480 ref = insn->op1; in jit_TLS()
492 ir_ref ref; in jit_CONST_ADDR() local
500 ref = Z_LVAL_P(zv); in jit_CONST_ADDR()
501 ZEND_ASSERT(jit->ctx.ir_base[ref].opt == IR_OPT(IR_ADDR, IR_ADDR)); in jit_CONST_ADDR()
503 ref = ir_unique_const_addr(&jit->ctx, addr); in jit_CONST_ADDR()
504 ZVAL_LONG(zv, ref); in jit_CONST_ADDR()
506 return ref; in jit_CONST_ADDR()
511 ir_ref ref; in jit_CONST_FUNC_PROTO() local
518 ref = Z_LVAL_P(zv); in jit_CONST_FUNC_PROTO()
519 …ZEND_ASSERT(jit->ctx.ir_base[ref].opt == IR_OPT(IR_FUNC_ADDR, IR_ADDR) && jit->ctx.ir_base[ref].pr… in jit_CONST_FUNC_PROTO()
521 ref = ir_unique_const_addr(&jit->ctx, addr); in jit_CONST_FUNC_PROTO()
522 insn = &jit->ctx.ir_base[ref]; in jit_CONST_FUNC_PROTO()
525 ZVAL_LONG(zv, ref); in jit_CONST_FUNC_PROTO()
527 return ref; in jit_CONST_FUNC_PROTO()
555 ir_ref ref = jit->eg_exception_addr; in jit_EG_exception()
557 if (UNEXPECTED(!ref)) { in jit_EG_exception()
558 ref = ir_unique_const_addr(&jit->ctx, (uintptr_t)&EG(exception)); in jit_EG_exception()
559 jit->eg_exception_addr = ref; in jit_EG_exception()
561 return ref; in jit_EG_exception()
567 ir_ref ref = jit->stub_addr[id]; in jit_STUB_ADDR() local
569 if (UNEXPECTED(!ref)) { in jit_STUB_ADDR()
570 ref = ir_unique_const_addr(&jit->ctx, (uintptr_t)zend_jit_stub_handlers[id]); in jit_STUB_ADDR()
571 jit->stub_addr[id] = ref; in jit_STUB_ADDR()
573 return ref; in jit_STUB_ADDR()
578 ir_ref ref = jit->stub_addr[id]; in jit_STUB_FUNC_ADDR() local
581 if (UNEXPECTED(!ref)) { in jit_STUB_FUNC_ADDR()
582 ref = ir_unique_const_addr(&jit->ctx, (uintptr_t)zend_jit_stub_handlers[id]); in jit_STUB_FUNC_ADDR()
583 insn = &jit->ctx.ir_base[ref]; in jit_STUB_FUNC_ADDR()
591 jit->stub_addr[id] = ref; in jit_STUB_FUNC_ADDR()
593 return ref; in jit_STUB_FUNC_ADDR()
642 ir_ref ref = STACK_REF(stack, snapshot_size - 1); in jit_SNAPSHOT() local
644 …if (!ref || ref == IR_NULL || (STACK_FLAGS(stack, snapshot_size - 1) & (/*ZREG_LOAD|*/ZREG_STORE))… in jit_SNAPSHOT()
655 ir_ref ref = STACK_REF(stack, i); in jit_SNAPSHOT() local
657 if (!ref || ref == IR_NULL || (STACK_FLAGS(stack, i) & (/*ZREG_LOAD|*/ZREG_STORE))) { in jit_SNAPSHOT()
658 ref = IR_UNUSED; in jit_SNAPSHOT()
660 ir_SNAPSHOT_SET_OP(snapshot, i + 1, ref); in jit_SNAPSHOT()
741 ir_ref ref = ir_insn_op(snapshot, i); in zend_jit_snapshot_handler() local
743 if (ref) { in zend_jit_snapshot_handler()
762 if (ref > 0) { in zend_jit_snapshot_handler()
768 && (t->stack_map[t->exit_info[exit_point].stack_offset + var].ref != ref in zend_jit_snapshot_handler()
775 t->stack_map[t->exit_info[exit_point].stack_offset + var].ref = ref; in zend_jit_snapshot_handler()
809 int32_t idx = _add_trace_const(t, ctx->ir_base[ref].val.i64); in zend_jit_snapshot_handler()
811 t->stack_map[t->exit_info[exit_point].stack_offset + var].ref = idx; in zend_jit_snapshot_handler()
876 ir_ref ref = jit->ctx.control; in jit_FP() local
879 if (ref == jit->fp) { in jit_FP()
882 insn = &jit->ctx.ir_base[ref]; in jit_FP()
887 ref = insn->op1; in jit_FP()
893 static void jit_STORE_FP(zend_jit_ctx *jit, ir_ref ref) in jit_STORE_FP() argument
895 ir_RSTORE(ZREG_FP, ref); in jit_STORE_FP()
904 static void jit_STORE_IP(zend_jit_ctx *jit, ir_ref ref) in jit_STORE_IP() argument
906 ir_RSTORE(ZREG_IP, ref); in jit_STORE_IP()
914 static void jit_LOAD_IP(zend_jit_ctx *jit, ir_ref ref) in jit_LOAD_IP() argument
917 jit_STORE_IP(jit, ref); in jit_LOAD_IP()
919 ir_STORE(jit_EX(opline), ref); in jit_LOAD_IP()
1010 ir_ref ref; in zend_jit_set_ip() local
1023 ref = jit_IP(jit); in zend_jit_set_ip()
1026 ref = ir_LOAD_A(addr); in zend_jit_set_ip()
1029 ref = ir_ADD_OFFSET(ref, (uintptr_t)target - (uintptr_t)jit->last_valid_opline); in zend_jit_set_ip()
1031 ref = ir_SUB_A(ref, ir_CONST_ADDR((uintptr_t)jit->last_valid_opline - (uintptr_t)target)); in zend_jit_set_ip()
1034 jit_STORE_IP(jit, ref); in zend_jit_set_ip()
1036 ir_STORE(addr, ref); in zend_jit_set_ip()
1098 static ir_ref jit_Z_TYPE_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_TYPE_ref() argument
1100 return ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zval, u1.v.type))); in jit_Z_TYPE_ref()
1124 static ir_ref jit_Z_TYPE_FLAGS_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_TYPE_FLAGS_ref() argument
1126 return ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zval, u1.v.type_flags))); in jit_Z_TYPE_FLAGS_ref()
1150 static ir_ref jit_Z_TYPE_INFO_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_TYPE_INFO_ref() argument
1152 return ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zval, u1.type_info))); in jit_Z_TYPE_INFO_ref()
1176 static void jit_set_Z_TYPE_INFO_ref(zend_jit_ctx *jit, ir_ref ref, ir_ref type_info) in jit_set_Z_TYPE_INFO_ref() argument
1178 ir_STORE(ir_ADD_OFFSET(ref, offsetof(zval, u1.type_info)), type_info); in jit_set_Z_TYPE_INFO_ref()
1213 static ir_ref jit_if_Z_TYPE_ref(zend_jit_ctx *jit, ir_ref ref, ir_ref type) in jit_if_Z_TYPE_ref() argument
1215 return ir_IF(ir_EQ(jit_Z_TYPE_ref(jit, ref), type)); in jit_if_Z_TYPE_ref()
1226 ir_ref ref = jit_Z_TYPE(jit, addr); in jit_if_not_Z_TYPE() local
1229 ref = ir_NE(ref, ir_CONST_U8(type)); in jit_if_not_Z_TYPE()
1231 return ir_IF(ref); in jit_if_not_Z_TYPE()
1236 ir_ref ref = jit_Z_TYPE(jit, addr); in jit_guard_Z_TYPE() local
1239 ir_GUARD(ir_EQ(ref, ir_CONST_U8(type)), ir_CONST_ADDR(exit_addr)); in jit_guard_Z_TYPE()
1241 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in jit_guard_Z_TYPE()
1247 ir_ref ref = jit_Z_TYPE(jit, addr); in jit_guard_not_Z_TYPE() local
1250 ref = ir_NE(ref, ir_CONST_U8(type)); in jit_guard_not_Z_TYPE()
1252 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in jit_guard_not_Z_TYPE()
1265 static ir_ref jit_Z_LVAL_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_LVAL_ref() argument
1267 return ir_LOAD_L(ref); in jit_Z_LVAL_ref()
1270 static ir_ref jit_Z_DVAL_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_DVAL_ref() argument
1272 return ir_LOAD_D(ref); in jit_Z_DVAL_ref()
1314 && jit->ra[jit->ssa->ops[jit->ssa->vars[var].definition].op2_use].ref == val) { in zend_jit_spilling_may_cause_conflict()
1333 ZEND_ASSERT(jit->ra && jit->ra[var].ref == IR_NULL); in zend_jit_def_reg()
1347 jit->ra[var].ref = val; in zend_jit_def_reg()
1361 jit->ra[src_var].ref = val; in zend_jit_def_reg()
1373 if (jit->ra[dst_phi->ssa_var].ref > 0) { in zend_jit_def_reg()
1374 ir_insn *phi_insn = &jit->ctx.ir_base[jit->ra[dst_phi->ssa_var].ref]; in zend_jit_def_reg()
1397 ZEND_ASSERT(jit->ra && jit->ra[var].ref); in zend_jit_use_reg()
1398 if (jit->ra[var].ref == IR_NULL) { in zend_jit_use_reg()
1400 ir_ref ref; in zend_jit_use_reg() local
1405 ref = jit_Z_LVAL_ref(jit, jit_ZVAL_ADDR(jit, mem_addr)); in zend_jit_use_reg()
1407 ref = jit_Z_DVAL_ref(jit, jit_ZVAL_ADDR(jit, mem_addr)); in zend_jit_use_reg()
1411 zend_jit_def_reg(jit, addr, ref); in zend_jit_use_reg()
1412 return ref; in zend_jit_use_reg()
1414 return jit->ra[Z_SSA_VAR(addr)].ref; in zend_jit_use_reg()
1424 ZEND_ASSERT(jit->ra[src_var].ref); in zend_jit_gen_pi()
1426 if (jit->ra[src_var].ref == IR_NULL) { in zend_jit_gen_pi()
1452 ir_ref ref; in zend_jit_gen_phi() local
1463 ref = ir_emit_N(&jit->ctx, IR_OPT(IR_PHI, type), n + 1); in zend_jit_gen_phi()
1464 ir_set_op(&jit->ctx, ref, 1, merge); in zend_jit_gen_phi()
1469 ZEND_ASSERT(jit->ra[src_var].ref); in zend_jit_gen_phi()
1470 if (jit->ra[src_var].ref == IR_NULL) { in zend_jit_gen_phi()
1480 ir_set_op(&jit->ctx, ref, i + 2, src_ref); in zend_jit_gen_phi()
1484 ref = same_src_ref; in zend_jit_gen_phi()
1488 zend_jit_def_reg(jit, ZEND_ADDR_REG(dst_var), ref); in zend_jit_gen_phi()
1547 static ir_ref jit_Z_PTR_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_PTR_ref() argument
1549 return ir_LOAD_A(ref); in jit_Z_PTR_ref()
1566 static ir_ref jit_GC_REFCOUNT(zend_jit_ctx *jit, ir_ref ref) in jit_GC_REFCOUNT() argument
1568 return ir_LOAD_U32(ref); in jit_GC_REFCOUNT()
1571 static void jit_set_GC_REFCOUNT(zend_jit_ctx *jit, ir_ref ref, uint32_t refcount) in jit_set_GC_REFCOUNT() argument
1573 ir_STORE(ref, ir_CONST_U32(refcount)); in jit_set_GC_REFCOUNT()
1576 static void jit_GC_ADDREF(zend_jit_ctx *jit, ir_ref ref) in jit_GC_ADDREF() argument
1578 ir_STORE(ref, ir_ADD_U32(ir_LOAD_U32(ref), ir_CONST_U32(1))); in jit_GC_ADDREF()
1581 static void jit_GC_ADDREF2(zend_jit_ctx *jit, ir_ref ref) in jit_GC_ADDREF2() argument
1583 ir_ref counter = ir_LOAD_U32(ref); in jit_GC_ADDREF2()
1584 ir_STORE(ref, ir_ADD_U32(counter, ir_CONST_U32(2))); in jit_GC_ADDREF2()
1587 static ir_ref jit_GC_DELREF(zend_jit_ctx *jit, ir_ref ref) in jit_GC_DELREF() argument
1589 ir_ref counter = ir_LOAD_U32(ref); in jit_GC_DELREF()
1591 ir_STORE(ref, counter); in jit_GC_DELREF()
1595 static ir_ref jit_if_GC_MAY_NOT_LEAK(zend_jit_ctx *jit, ir_ref ref) in jit_if_GC_MAY_NOT_LEAK() argument
1599 ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_refcounted, gc.u.type_info))), in jit_if_GC_MAY_NOT_LEAK()
1605 ir_ref ref = IR_UNUSED; in jit_ZVAL_COPY_CONST() local
1615 ref = ir_CONST_ADDR(Z_PTR_P(zv)); in jit_ZVAL_COPY_CONST()
1616 jit_set_Z_PTR(jit, dst, ref); in jit_ZVAL_COPY_CONST()
1618 jit_GC_ADDREF(jit, ref); in jit_ZVAL_COPY_CONST()
1633 static ir_ref jit_if_TYPED_REF(zend_jit_ctx *jit, ir_ref ref) in jit_if_TYPED_REF() argument
1635 return ir_IF(ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_reference, sources.ptr)))); in jit_if_TYPED_REF()
1640 ir_ref ref = IR_UNUSED; in jit_ZVAL_COPY() local
1653 ref = jit_Z_PTR(jit, src); in jit_ZVAL_COPY()
1654 jit_set_Z_PTR(jit, dst, ref); in jit_ZVAL_COPY()
1677 jit_GC_ADDREF(jit, ref); in jit_ZVAL_COPY()
1689 ir_ref ref = IR_UNUSED; in jit_ZVAL_COPY_2() local
1693 ref = jit_Z_LVAL(jit, src); in jit_ZVAL_COPY_2()
1694 jit_set_Z_LVAL(jit, dst, ref); in jit_ZVAL_COPY_2()
1695 jit_set_Z_LVAL(jit, dst2, ref); in jit_ZVAL_COPY_2()
1697 ref = jit_Z_DVAL(jit, src); in jit_ZVAL_COPY_2()
1698 jit_set_Z_DVAL(jit, dst, ref); in jit_ZVAL_COPY_2()
1699 jit_set_Z_DVAL(jit, dst2, ref); in jit_ZVAL_COPY_2()
1703 ref = jit_Z_W2(jit, src); in jit_ZVAL_COPY_2()
1704 jit_set_Z_W2(jit, dst, ref); in jit_ZVAL_COPY_2()
1705 jit_set_Z_W2(jit, dst2, ref); in jit_ZVAL_COPY_2()
1708 ref = jit_Z_PTR(jit, src); in jit_ZVAL_COPY_2()
1709 jit_set_Z_PTR(jit, dst, ref); in jit_ZVAL_COPY_2()
1710 jit_set_Z_PTR(jit, dst2, ref); in jit_ZVAL_COPY_2()
1740 jit_GC_ADDREF2(jit, ref); in jit_ZVAL_COPY_2()
1742 jit_GC_ADDREF(jit, ref); in jit_ZVAL_COPY_2()
1753 static void jit_ZVAL_DTOR(zend_jit_ctx *jit, ir_ref ref, uint32_t op_info, const zend_op *opline) in jit_ZVAL_DTOR() argument
1759 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(_efree), ref); in jit_ZVAL_DTOR()
1766 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_array_destroy), ref); in jit_ZVAL_DTOR()
1768 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_array_free), ref); in jit_ZVAL_DTOR()
1775 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_objects_store_del), ref); in jit_ZVAL_DTOR()
1782 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(rc_dtor_func), ref); in jit_ZVAL_DTOR()
1791 ir_ref ref, ref2; in jit_ZVAL_PTR_DTOR() local
1803 ref = jit_Z_PTR(jit, addr); in jit_ZVAL_PTR_DTOR()
1804 ref2 = jit_GC_DELREF(jit, ref); in jit_ZVAL_PTR_DTOR()
1812 jit_ZVAL_DTOR(jit, ref, op_info, opline); in jit_ZVAL_PTR_DTOR()
1827 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val)); in jit_ZVAL_PTR_DTOR()
1837 ref = ir_PHI_2(IR_ADDR, ref2, ref); in jit_ZVAL_PTR_DTOR()
1840 if_may_not_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in jit_ZVAL_PTR_DTOR()
1848 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in jit_ZVAL_PTR_DTOR()
1871 static void jit_OBJ_RELEASE(zend_jit_ctx *jit, ir_ref ref) in jit_OBJ_RELEASE() argument
1877 if_not_zero = ir_IF(jit_GC_DELREF(jit, ref)); in jit_OBJ_RELEASE()
1881 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_objects_store_del), ref); in jit_OBJ_RELEASE()
1885 if_may_not_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in jit_OBJ_RELEASE()
1891 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in jit_OBJ_RELEASE()
1899 ir_ref ref = ir_LOAD_U8(jit_EG(vm_interrupt)); in zend_jit_check_timeout() local
1902 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_check_timeout()
1904 ir_GUARD_NOT(ref, jit_STUB_ADDR(jit, jit_stub_interrupt_handler)); in zend_jit_check_timeout()
1906 ir_ref if_timeout = ir_IF(ref); in zend_jit_check_timeout()
1932 ir_ref ref, if_negative; in zend_jit_exception_handler_stub() local
1934 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), jit_FP(jit)); in zend_jit_exception_handler_stub()
1935 if_negative = ir_IF(ir_LT(ref, ir_CONST_U32(0))); in zend_jit_exception_handler_stub()
1938 ref = ir_PHI_2(IR_I32, ref, ir_CONST_I32(1)); in zend_jit_exception_handler_stub()
1939 ir_RETURN(ref); in zend_jit_exception_handler_stub()
1947 ir_ref ref, result_type, if_result_used; in zend_jit_exception_handler_undef_stub() local
1949 ref = jit_EG(opline_before_exception); in zend_jit_exception_handler_undef_stub()
1950 result_type = ir_LOAD_U8(ir_ADD_OFFSET(ir_LOAD_A(ref), offsetof(zend_op, result_type))); in zend_jit_exception_handler_undef_stub()
1955 ref = ir_LOAD_U32(ir_ADD_OFFSET(ir_LOAD_A(ref), offsetof(zend_op, result.var))); in zend_jit_exception_handler_undef_stub()
1957 ref = ir_ZEXT_A(ref); in zend_jit_exception_handler_undef_stub()
1959 …ir_STORE(ir_ADD_OFFSET(ir_ADD_A(jit_FP(jit), ref), offsetof(zval, u1.type_info)), ir_CONST_U32(IS_… in zend_jit_exception_handler_undef_stub()
1969 ir_ref ref, if_dtor; in zend_jit_exception_handler_free_op1_op2_stub() local
1972 ref = ir_LOAD_A(jit_EG(opline_before_exception)); in zend_jit_exception_handler_free_op1_op2_stub()
1973 if_dtor = ir_IF(ir_AND_U8(ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zend_op, op1_type))), in zend_jit_exception_handler_free_op1_op2_stub()
1976 ref = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_op, op1.var))); in zend_jit_exception_handler_free_op1_op2_stub()
1978 ref = ir_ZEXT_A(ref); in zend_jit_exception_handler_free_op1_op2_stub()
1980 ref = ir_ADD_A(jit_FP(jit), ref); in zend_jit_exception_handler_free_op1_op2_stub()
1981 var_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_exception_handler_free_op1_op2_stub()
1992 ir_ref ref, if_dtor; in zend_jit_exception_handler_free_op2_stub() local
1995 ref = ir_LOAD_A(jit_EG(opline_before_exception)); in zend_jit_exception_handler_free_op2_stub()
1996 if_dtor = ir_IF(ir_AND_U8(ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zend_op, op2_type))), in zend_jit_exception_handler_free_op2_stub()
1999 ref = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_op, op2.var))); in zend_jit_exception_handler_free_op2_stub()
2001 ref = ir_ZEXT_A(ref); in zend_jit_exception_handler_free_op2_stub()
2003 ref = ir_ADD_A(jit_FP(jit), ref); in zend_jit_exception_handler_free_op2_stub()
2004 var_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_exception_handler_free_op2_stub()
2115 ir_ref ref = ir_LOAD_A(jit_FP(jit)); in zend_jit_undefined_function_stub() local
2116 ir_ref arg3 = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_op, op2.constant))); in zend_jit_undefined_function_stub()
2119 arg3 = ir_LOAD_A(ir_ADD_A(ref, ir_SEXT_A(arg3))); in zend_jit_undefined_function_stub()
2139 ir_ref opline, ref, rx, if_eq, if_tmp; in zend_jit_throw_cannot_pass_by_ref_stub() local
2145 ref = ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, result.var))); in zend_jit_throw_cannot_pass_by_ref_stub()
2147 ref = ir_ZEXT_A(ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2150 jit_set_Z_TYPE_INFO_ref(jit, ir_ADD_A(rx, ref), ir_CONST_U32(IS_UNDEF)); in zend_jit_throw_cannot_pass_by_ref_stub()
2154 ref = ir_LOAD_A(jit_EX(call)); in zend_jit_throw_cannot_pass_by_ref_stub()
2155 if_eq = ir_IF(ir_EQ(rx, ref)); in zend_jit_throw_cannot_pass_by_ref_stub()
2159 ir_STORE(jit_CALL(rx, prev_execute_data), ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2173 ref = ir_LOAD_U8(ir_ADD_OFFSET(jit_IP(jit), offsetof(zend_op, op1_type))); in zend_jit_throw_cannot_pass_by_ref_stub()
2174 if_tmp = ir_IF(ir_EQ(ref, ir_CONST_U8(IS_TMP_VAR))); in zend_jit_throw_cannot_pass_by_ref_stub()
2178 ref = ir_LOAD_U32(ir_ADD_OFFSET(jit_IP(jit), offsetof(zend_op, op1.var))); in zend_jit_throw_cannot_pass_by_ref_stub()
2180 ref = ir_ZEXT_A(ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2182 ref = ir_ADD_A(jit_FP(jit), ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2184 ZEND_ADDR_REF_ZVAL(ref), in zend_jit_throw_cannot_pass_by_ref_stub()
2292 ir_ref func, jit_extension, addr, ref, if_overflow; in _zend_jit_hybrid_hot_counter_stub() local
2297 ref = ir_SUB_I16(ir_LOAD_I16(addr), ir_CONST_I16(cost)); in _zend_jit_hybrid_hot_counter_stub()
2298 ir_STORE(addr, ref); in _zend_jit_hybrid_hot_counter_stub()
2299 if_overflow = ir_IF(ir_LE(ref, ir_CONST_I16(0))); in _zend_jit_hybrid_hot_counter_stub()
2309 ref = ir_SUB_A(jit_IP(jit), in _zend_jit_hybrid_hot_counter_stub()
2311 ref = ir_DIV_A(ref, ir_CONST_ADDR(sizeof(zend_op) / sizeof(void*))); in _zend_jit_hybrid_hot_counter_stub()
2314 ref); in _zend_jit_hybrid_hot_counter_stub()
2365 ir_ref func, jit_extension, offset, addr, ref, if_overflow, ret, if_halt; in _zend_jit_hybrid_trace_counter_stub() local
2371 ref = ir_SUB_I16(ir_LOAD_I16(addr), ir_CONST_I16(cost)); in _zend_jit_hybrid_trace_counter_stub()
2372 ir_STORE(addr, ref); in _zend_jit_hybrid_trace_counter_stub()
2373 if_overflow = ir_IF(ir_LE(ref, ir_CONST_I16(0))); in _zend_jit_hybrid_trace_counter_stub()
2383 ref = jit_EG(current_execute_data); in _zend_jit_hybrid_trace_counter_stub()
2384 jit_STORE_FP(jit, ir_LOAD_A(ref)); in _zend_jit_hybrid_trace_counter_stub()
2385 ref = ir_LOAD_A(jit_EX(opline)); in _zend_jit_hybrid_trace_counter_stub()
2386 jit_STORE_IP(jit, ref); in _zend_jit_hybrid_trace_counter_stub()
2454 ir_ref ref, ret, if_zero, addr; in zend_jit_trace_exit_stub() local
2468 ref = jit_EG(current_execute_data); in zend_jit_trace_exit_stub()
2469 jit_STORE_FP(jit, ir_LOAD_A(ref)); in zend_jit_trace_exit_stub()
2470 ref = ir_LOAD_A(jit_EX(opline)); in zend_jit_trace_exit_stub()
2471 jit_STORE_IP(jit, ref); in zend_jit_trace_exit_stub()
2481 ref = jit_EG(current_execute_data); in zend_jit_trace_exit_stub()
2482 jit_STORE_FP(jit, ir_LOAD_A(ref)); in zend_jit_trace_exit_stub()
2485 ref = ir_LOAD_A(jit_EX(opline)); in zend_jit_trace_exit_stub()
2486 jit_STORE_IP(jit, ref); in zend_jit_trace_exit_stub()
2499 ref = ir_CALL_1(IR_I32, addr, jit_FP(jit)); in zend_jit_trace_exit_stub()
2500 ir_GUARD(ir_GE(ref, ir_CONST_I32(0)), jit_STUB_ADDR(jit, jit_stub_trace_halt)); in zend_jit_trace_exit_stub()
2532 ir_ref ref, if_result_used; in zend_jit_cannot_add_element_stub() local
2539 ref = ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, result.var))); in zend_jit_cannot_add_element_stub()
2541 ref = ir_ZEXT_A(ref); in zend_jit_cannot_add_element_stub()
2543 jit_set_Z_TYPE_INFO_ref(jit, ir_ADD_A(jit_FP(jit), ref), ir_CONST_U32(IS_UNDEF)); in zend_jit_cannot_add_element_stub()
2640 ir_ref ref = ir_CALL(IR_ADDR, ir_CONST_FC_FUNC(_zend_new_array_0)); in zend_jit_new_array_stub() local
2642 jit_set_Z_PTR(jit, var_addr, ref); in zend_jit_new_array_stub()
2644 ir_RETURN(ref); in zend_jit_new_array_stub()
3152 ir_ref ref = ir_PARAM(IR_ADDR, "execute_data", 1); in zend_jit_calc_trace_prologue_size() local
3153 jit_STORE_FP(jit, ref); in zend_jit_calc_trace_prologue_size()
3538 ir_ref ref = ir_IF(condition); in jit_IF_ex() local
3544 ir_set_op(&jit->ctx, ref, 3, true_block); in jit_IF_ex()
3545 return ref; in jit_IF_ex()
3561 static void _zend_jit_add_predecessor_ref(zend_jit_ctx *jit, int b, int pred, ir_ref ref) in _zend_jit_add_predecessor_ref() argument
3573 ZEND_ASSERT(*r == IR_UNUSED || *r == ref); in _zend_jit_add_predecessor_ref()
3578 if (jit->ctx.ir_base[ref].op == IR_END) { in _zend_jit_add_predecessor_ref()
3579 jit->ctx.ir_base[ref].op = IR_LOOP_END; in _zend_jit_add_predecessor_ref()
3580 } else if (jit->ctx.ir_base[ref].op == IR_IF) { in _zend_jit_add_predecessor_ref()
3581 jit_IF_TRUE_FALSE_ex(jit, ref, b); in _zend_jit_add_predecessor_ref()
3582 ref = ir_LOOP_END(); in _zend_jit_add_predecessor_ref()
3583 } else if (jit->ctx.ir_base[ref].op == IR_UNREACHABLE) { in _zend_jit_add_predecessor_ref()
3584 ir_BEGIN(ref); in _zend_jit_add_predecessor_ref()
3585 ref = ir_LOOP_END(); in _zend_jit_add_predecessor_ref()
3589 ir_MERGE_SET_OP(header, i + 1, ref); in _zend_jit_add_predecessor_ref()
3591 *r = ref; in _zend_jit_add_predecessor_ref()
3649 ir_ref ref; in _zend_jit_fix_merges() local
3655 ref = *p; in _zend_jit_fix_merges()
3656 if (ref) { in _zend_jit_fix_merges()
3657 insn = &jit->ctx.ir_base[ref]; in _zend_jit_fix_merges()
3758 ir_ref ref = jit->ctx.ir_base[switch_ref].op3; in zend_jit_case_start() local
3760 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_END); in zend_jit_case_start()
3761 ir_ref end = ref; in zend_jit_case_start()
3767 list = ref; in zend_jit_case_start()
3784 ir_ref ref, bb_start; in zend_jit_bb_start() local
3796 ref = jit->ctx.control; in zend_jit_bb_start()
3797 ir_insn *insn = &jit->ctx.ir_base[ref]; in zend_jit_bb_start()
3799 ref = insn->op1; in zend_jit_bb_start()
3800 insn = &jit->ctx.ir_base[ref]; in zend_jit_bb_start()
3803 ZEND_ASSERT(ref == 1); in zend_jit_bb_start()
3814 ref = jit->bb_edges[jit->bb_predecessors[b]]; in zend_jit_bb_start()
3815 if (ref == IR_UNUSED) { in zend_jit_bb_start()
3820 ir_op op = jit->ctx.ir_base[ref].op; in zend_jit_bb_start()
3824 jit_IF_TRUE_FALSE_ex(jit, ref, b); in zend_jit_bb_start()
3827 jit_IF_TRUE_FALSE_ex(jit, ref, b); in zend_jit_bb_start()
3831 zend_jit_case_start(jit, pred, b, ref); in zend_jit_bb_start()
3838 jit->ctx.control = ir_emit1(&jit->ctx, IR_BEGIN, ref); in zend_jit_bb_start()
3840 ir_BEGIN(ref); in zend_jit_bb_start()
3843 ir_MERGE_WITH(ref); in zend_jit_bb_start()
3865 ref = jit->bb_edges[jit->bb_predecessors[b] + i]; in zend_jit_bb_start()
3866 if (ref == IR_UNUSED) { in zend_jit_bb_start()
3870 ir_op op = jit->ctx.ir_base[ref].op; in zend_jit_bb_start()
3873 jit_IF_TRUE_FALSE_ex(jit, ref, b); in zend_jit_bb_start()
3876 zend_jit_case_start(jit, pred, b, ref); in zend_jit_bb_start()
3880 pred_refs[i] = ref; in zend_jit_bb_start()
3951 ir_ref ref; in jit_CMP_IP() local
3955 ref = jit_IP32(jit); in jit_CMP_IP()
3957 ref = ir_LOAD_U32(jit_EX(opline)); in jit_CMP_IP()
3959 ref = ir_CMP_OP(op, ref, ir_CONST_U32((uint32_t)(uintptr_t)next_opline)); in jit_CMP_IP()
3962 ref = jit_IP(jit); in jit_CMP_IP()
3964 ref = ir_LOAD_A(jit_EX(opline)); in jit_CMP_IP()
3966 ref = ir_CMP_OP(op, ref, ir_CONST_ADDR(next_opline)); in jit_CMP_IP()
3968 return ref; in jit_CMP_IP()
3977 ir_ref ref, if_ref, cache_result, function_result, phi_result, cache_slot_ref; in zend_jit_jmp_frameless() local
4001 ref = jit_IF_ex(jit, ir_EQ(phi_result, ir_CONST_LONG(ZEND_JMP_FL_HIT)), bb->successors[0]); in zend_jit_jmp_frameless()
4002 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_jmp_frameless()
4003 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_jmp_frameless()
4012 ir_ref ref; in zend_jit_cond_jmp() local
4026 ref = jit_IF_ex(jit, jit_CMP_IP(jit, IR_NE, next_opline), target_block); in zend_jit_cond_jmp()
4028 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_cond_jmp()
4029 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_cond_jmp()
4039 ir_ref ref; in zend_jit_set_cond() local
4041 ref = ir_ADD_U32(ir_ZEXT_U32(jit_CMP_IP(jit, IR_EQ, next_opline)), ir_CONST_U32(IS_FALSE)); in zend_jit_set_cond()
4044 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), var + offsetof(zval, u1.type_info)), ref); in zend_jit_set_cond()
4094 ir_ref ref, in zend_jit_zval_check_undef() argument
4101 if_def = ir_IF(jit_Z_TYPE_ref(jit, ref)); in zend_jit_zval_check_undef()
4118 return ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_zval_check_undef()
4125 ir_ref ref; in zend_jit_recv_entry() local
4130 ref = jit->bb_edges[pred]; in zend_jit_recv_entry()
4132 ZEND_ASSERT(ref); in zend_jit_recv_entry()
4133 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_END); in zend_jit_recv_entry()
4136 ir_ENTRY(ref, bb->start); in zend_jit_recv_entry()
4144 ir_MERGE_WITH(ref); in zend_jit_recv_entry()
4151 ir_ref ref = ir_END(); in zend_jit_osr_entry() local
4154 ir_ENTRY(ref, bb->start); in zend_jit_osr_entry()
4162 ir_MERGE_WITH(ref); in zend_jit_osr_entry()
4179 ir_ref ref; in zend_jit_handler() local
4191 ref = jit_FP(jit); in zend_jit_handler()
4192 ref = ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(handler), ref); in zend_jit_handler()
4219 ir_ref ref; in zend_jit_tail_handler() local
4235 ref = ir_LOAD_A(jit_IP(jit)); in zend_jit_tail_handler()
4236 ir_TAILCALL(IR_VOID, ref); in zend_jit_tail_handler()
4249 ref = jit_FP(jit); in zend_jit_tail_handler()
4250 ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref); in zend_jit_tail_handler()
4253 ref = jit_FP(jit); in zend_jit_tail_handler()
4254 ir_TAILCALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref); in zend_jit_tail_handler()
4281 ref = jit->ctx.insns_count - 1; in zend_jit_tail_handler()
4282 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_UNREACHABLE || jit->ctx.ir_base[ref].op == IR_RETURN); in zend_jit_tail_handler()
4283 ref = zend_jit_continue_entry(jit, ref, jit->ssa->cfg.blocks[succ].start); in zend_jit_tail_handler()
4284 _zend_jit_add_predecessor_ref(jit, succ, jit->b, ref); in zend_jit_tail_handler()
4404 ir_ref ref = jit->ctx.control; in zend_jit_deopt_rload() local
4408 insn = &jit->ctx.ir_base[ref]; in zend_jit_deopt_rload()
4411 return ref; in zend_jit_deopt_rload()
4415 ref = insn->op1; in zend_jit_deopt_rload()
4425 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_const_long()
4438 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_const_double()
4464 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_reg()
4478 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_reg()
4502 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_spill_slot()
4515 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_spill_slot()
4767 ir_ref ref; in zend_jit_inc_dec() local
4795 ref = ir_BINARY_OP_L(op, op1_lval_ref, ir_CONST_LONG(1)); in zend_jit_inc_dec()
4797 jit_set_Z_LVAL(jit, op1_def_addr, ref); in zend_jit_inc_dec()
4834 ir_GUARD_NOT(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_inc_dec()
4838 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4870 if_overflow = ir_IF(ir_OVERFLOW(ref)); in zend_jit_inc_dec()
4872 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4879 ir_GUARD(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_inc_dec()
4885 if_overflow = ir_IF(ir_OVERFLOW(ref)); in zend_jit_inc_dec()
4889 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4961 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4989 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_inc_dec()
4994 if_ref = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(IS_REFERENCE)); in zend_jit_inc_dec()
4996 ref2 = jit_Z_PTR_ref(jit, ref); in zend_jit_inc_dec()
5026 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_inc_dec()
5033 ZEND_ADDR_REF_ZVAL(ref), op1_info, 1); in zend_jit_inc_dec()
5038 ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(zend_jit_pre_inc), ref, arg2); in zend_jit_inc_dec()
5040 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(increment_function), ref); in zend_jit_inc_dec()
5045 ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(zend_jit_pre_dec), ref, arg2); in zend_jit_inc_dec()
5047 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(decrement_function), ref); in zend_jit_inc_dec()
5054 ref = jit_Z_DVAL(jit, op1_addr); in zend_jit_inc_dec()
5056 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_inc_dec()
5064 ref = ir_BINARY_OP_D(op, ref, ir_CONST_DOUBLE(1.0)); in zend_jit_inc_dec()
5065 jit_set_Z_DVAL(jit, op1_def_addr, ref); in zend_jit_inc_dec()
5068 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_inc_dec()
5098 ir_ref op1, op2, ref, if_overflow = IR_UNUSED; in zend_jit_math_long_long() local
5111 ref = ir_BINARY_OP_L(op, op1, op2); in zend_jit_math_long_long()
5143 ir_GUARD_NOT(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_math_long_long()
5152 ir_GUARD(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_math_long_long()
5157 if_overflow = ir_IF(ir_OVERFLOW(ref)); in zend_jit_math_long_long()
5163 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_math_long_long()
5239 ref = ir_BINARY_OP_D(op, op1, op2); in zend_jit_math_long_long()
5240 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_long_long()
5260 ir_ref op1, op2, ref; in zend_jit_math_long_double() local
5275 ref = ir_BINARY_OP_D(op, ir_INT2D(op1), op2); in zend_jit_math_long_double()
5276 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_long_double()
5294 ir_ref op1, op2, ref; in zend_jit_math_double_long() local
5309 ref = ir_BINARY_OP_D(op, op1, ir_INT2D(op2)); in zend_jit_math_double_long()
5310 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_double_long()
5331 ir_ref op1, op2, ref; in zend_jit_math_double_double() local
5346 ref = ir_BINARY_OP_D(op, op1, op2); in zend_jit_math_double_double()
5347 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_double_double()
5393 if (!has_concrete_type(op2_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op1_addr)].ref == IR_NULL) { in zend_jit_math_helper()
5398 if (!has_concrete_type(op1_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op2_addr)].ref == IR_NULL) { in zend_jit_math_helper()
5676 ir_ref ref; in zend_jit_add_arrays() local
5680 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_add_arrays_helper), arg1, arg2); in zend_jit_add_arrays()
5681 jit_set_Z_PTR(jit, res_addr, ref); in zend_jit_add_arrays()
5707 ir_ref ref = IR_UNUSED; in zend_jit_long_math_helper() local
5717 && jit->ra[Z_SSA_VAR(op1_addr)].ref == IR_NULL) { in zend_jit_long_math_helper()
5723 && jit->ra[Z_SSA_VAR(op2_addr)].ref == IR_NULL) { in zend_jit_long_math_helper()
5743 ref = ir_CONST_LONG(0); in zend_jit_long_math_helper()
5750 ref = ir_CONST_LONG(0); // dead code in zend_jit_long_math_helper()
5754 ref = ir_SHL_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval)); in zend_jit_long_math_helper()
5757 ref = jit_Z_LVAL(jit, op2_addr); in zend_jit_long_math_helper()
5765 if_wrong = ir_IF(ir_UGT(ref, ir_CONST_LONG((SIZEOF_ZEND_LONG * 8) - 1))); in zend_jit_long_math_helper()
5767 if_ok = ir_IF(ir_GE(ref, ir_CONST_LONG(0))); in zend_jit_long_math_helper()
5777 ref = ir_SHL_L(op1_ref, ref); in zend_jit_long_math_helper()
5779 ref = ir_PHI_2(IR_LONG, ref, ref2); in zend_jit_long_math_helper()
5781 ref = ir_SHL_L(jit_Z_LVAL(jit, op1_addr), ref); in zend_jit_long_math_helper()
5790 ref = ir_SAR_L( in zend_jit_long_math_helper()
5799 ref = ir_CONST_LONG(0); // dead code in zend_jit_long_math_helper()
5803 ref = ir_SAR_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval)); in zend_jit_long_math_helper()
5806 ref = jit_Z_LVAL(jit, op2_addr); in zend_jit_long_math_helper()
5813 if_wrong = ir_IF(ir_UGT(ref, ir_CONST_LONG((SIZEOF_ZEND_LONG * 8) - 1))); in zend_jit_long_math_helper()
5815 if_ok = ir_IF(ir_GE(ref, ir_CONST_LONG(0))); in zend_jit_long_math_helper()
5826 ref = ir_PHI_2(IR_LONG, ref, ref2); in zend_jit_long_math_helper()
5828 ref = ir_SAR_L(jit_Z_LVAL(jit, op1_addr), ref); in zend_jit_long_math_helper()
5840 ref = ir_CONST_LONG(0); // dead code in zend_jit_long_math_helper()
5843 ref = ir_AND_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval - 1)); in zend_jit_long_math_helper()
5845 ref = ir_MOD_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval)); in zend_jit_long_math_helper()
5851 ref = jit_Z_LVAL(jit, op2_addr); in zend_jit_long_math_helper()
5853 ir_ref if_ok = ir_IF(ref); in zend_jit_long_math_helper()
5864 ir_ref if_minus_one = ir_IF(ir_EQ(ref, ir_CONST_LONG(-1))); in zend_jit_long_math_helper()
5869 ref = ir_MOD_L(op1_ref, ref); in zend_jit_long_math_helper()
5873 ref = ir_PHI_2(IR_LONG, ref, ir_CONST_LONG(0)); in zend_jit_long_math_helper()
5891 ref = ir_BINARY_OP_L(op, op1, op2); in zend_jit_long_math_helper()
5894 if (ref) { in zend_jit_long_math_helper()
5901 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_long_math_helper()
5917 ir_ref ref; in zend_jit_long_math_helper() local
5919 ref = ir_END(); in zend_jit_long_math_helper()
5921 ir_MERGE_2(ref, ir_END()); in zend_jit_long_math_helper()
5929 ir_ref if_def, ref, ref2; in zend_jit_long_math_helper() local
5931 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_long_math_helper()
5940 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_long_math_helper()
5941 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_long_math_helper()
5945 ir_ref if_def, ref, ref2; in zend_jit_long_math_helper() local
5947 ref = jit_ZVAL_ADDR(jit, op2_addr); in zend_jit_long_math_helper()
5956 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_long_math_helper()
5957 op2_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_long_math_helper()
6185 ir_ref ref, ref2, arg2, op1_noref_path; in zend_jit_assign_op() local
6190 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_assign_op()
6191 if_op1_ref = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(IS_REFERENCE)); in zend_jit_assign_op()
6195 ref2 = jit_Z_PTR_ref(jit, ref); in zend_jit_assign_op()
6225 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_assign_op()
6227 op1_def_addr = op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_assign_op()
6266 static ir_ref jit_ZVAL_DEREF_ref(zend_jit_ctx *jit, ir_ref ref) in jit_ZVAL_DEREF_ref() argument
6270 if_ref = ir_IF(ir_EQ(jit_Z_TYPE_ref(jit, ref), ir_CONST_U8(IS_REFERENCE))); in jit_ZVAL_DEREF_ref()
6272 ref2 = ir_ADD_OFFSET(jit_Z_PTR_ref(jit, ref), offsetof(zend_reference, val)); in jit_ZVAL_DEREF_ref()
6274 return ir_PHI_2(IR_ADDR, ref2, ref); in jit_ZVAL_DEREF_ref()
6279 ir_ref ref = jit_ZVAL_ADDR(jit, addr); in jit_ZVAL_DEREF() local
6280 ref = jit_ZVAL_DEREF_ref(jit, ref); in jit_ZVAL_DEREF()
6281 return ZEND_ADDR_REF_ZVAL(ref); in jit_ZVAL_DEREF()
6284 static ir_ref jit_ZVAL_INDIRECT_DEREF_ref(zend_jit_ctx *jit, ir_ref ref) in jit_ZVAL_INDIRECT_DEREF_ref() argument
6288 if_ref = ir_IF(ir_EQ(jit_Z_TYPE_ref(jit, ref), ir_CONST_U8(IS_INDIRECT))); in jit_ZVAL_INDIRECT_DEREF_ref()
6290 ref2 = jit_Z_PTR_ref(jit, ref); in jit_ZVAL_INDIRECT_DEREF_ref()
6292 return ir_PHI_2(IR_ADDR, ref2, ref); in jit_ZVAL_INDIRECT_DEREF_ref()
6297 ir_ref ref = jit_ZVAL_ADDR(jit, addr); in jit_ZVAL_INDIRECT_DEREF() local
6298 ref = jit_ZVAL_INDIRECT_DEREF_ref(jit, ref); in jit_ZVAL_INDIRECT_DEREF()
6299 return ZEND_ADDR_REF_ZVAL(ref); in jit_ZVAL_INDIRECT_DEREF()
6359 ir_ref ref = jit_ZVAL_ADDR(jit, val_addr); in zend_jit_simple_assign() local
6360 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_simple_assign()
6361 val_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_simple_assign()
6363 ir_ref ref, type, if_ref, ref2, refcount, if_not_zero; in zend_jit_simple_assign() local
6365 ref = jit_ZVAL_ADDR(jit, val_addr); in zend_jit_simple_assign()
6366 type = jit_Z_TYPE_ref(jit, ref); in zend_jit_simple_assign()
6370 ref = jit_Z_PTR_ref(jit, ref); in zend_jit_simple_assign()
6371 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val)); in zend_jit_simple_assign()
6385 refcount = jit_GC_DELREF(jit, ref); in zend_jit_simple_assign()
6391 jit_ZVAL_DTOR(jit, ref, val_info, opline); in zend_jit_simple_assign()
6525 if (Z_MODE(val_addr) == IS_REG && jit->ra[Z_SSA_VAR(val_addr)].ref == IR_NULL) { in zend_jit_assign_to_variable()
6543 ir_ref ref = 0, if_ref = 0, ref2, arg2, if_typed, non_ref_path; in zend_jit_assign_to_variable() local
6547 ref = jit_ZVAL_ADDR(jit, var_use_addr); in zend_jit_assign_to_variable()
6548 if_ref = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(IS_REFERENCE)); in zend_jit_assign_to_variable()
6550 ref2 = jit_Z_PTR_ref(jit, ref); in zend_jit_assign_to_variable()
6611 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_assign_to_variable()
6612 var_addr = var_use_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_assign_to_variable()
6619 ir_ref ref, counter, if_not_zero; in zend_jit_assign_to_variable() local
6629 ref = jit_Z_PTR(jit, var_use_addr); in zend_jit_assign_to_variable()
6634 counter = jit_GC_DELREF(jit, ref); in zend_jit_assign_to_variable()
6638 jit_ZVAL_DTOR(jit, ref, var_info, opline); in zend_jit_assign_to_variable()
6645 ir_ref if_may_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in zend_jit_assign_to_variable()
6650 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in zend_jit_assign_to_variable()
6673 jit_GC_DELREF(jit, ref); in zend_jit_assign_to_variable()
6675 ir_ref if_may_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in zend_jit_assign_to_variable()
6680 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in zend_jit_assign_to_variable()
6868 ir_ref ref; in zend_jit_cmp_long_long() local
6897 ref = ir_CMP_OP(zend_jit_cmp_op(opline), jit_Z_LVAL(jit, op1_addr), jit_Z_LVAL(jit, op2_addr)); in zend_jit_cmp_long_long()
6901 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_long_long()
6906 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6908 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6912 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6914 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6918 return jit_IF_ex(jit, ref, in zend_jit_cmp_long_long()
6933 …ir_ref ref = ir_CMP_OP(zend_jit_cmp_op(opline), ir_INT2D(jit_Z_LVAL(jit, op1_addr)), jit_Z_DVAL(ji… in zend_jit_cmp_long_double() local
6937 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_long_double()
6941 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_double()
6943 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_double()
6946 return jit_IF_ex(jit, ref, in zend_jit_cmp_long_double()
6954 …ir_ref ref = ir_CMP_OP(zend_jit_cmp_op(opline), jit_Z_DVAL(jit, op1_addr), ir_INT2D(jit_Z_LVAL(jit… in zend_jit_cmp_double_long() local
6958 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_double_long()
6962 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_long()
6964 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_long()
6967 return jit_IF_ex(jit, ref, in zend_jit_cmp_double_long()
6975 …ir_ref ref = ir_CMP_OP(zend_jit_cmp_op(opline), jit_Z_DVAL(jit, op1_addr), jit_Z_DVAL(jit, op2_add… in zend_jit_cmp_double_double() local
6979 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_double_double()
6984 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6986 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6990 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6992 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6996 return jit_IF_ex(jit, ref, in zend_jit_cmp_double_double()
7008 static ir_ref zend_jit_cmp_slow(zend_jit_ctx *jit, ir_ref ref, const zend_op *opline, zend_jit_addr… in zend_jit_cmp_slow() argument
7010 ref = ir_CMP_OP(zend_jit_cmp_op(opline), ref, ir_CONST_I32(0)); in zend_jit_cmp_slow()
7014 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_slow()
7018 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_slow()
7020 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_slow()
7023 return jit_IF_ex(jit, ref, in zend_jit_cmp_slow()
7046 ir_ref ref = IR_UNUSED; in zend_jit_cmp() local
7066 if (!has_concrete_type(op2_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op1_addr)].ref == IR_NULL) { in zend_jit_cmp()
7071 if (!has_concrete_type(op1_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op2_addr)].ref == IR_NULL) { in zend_jit_cmp()
7092 …ref = zend_jit_cmp_long_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7093 if (!ref) { in zend_jit_cmp()
7096 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7102 …ref = zend_jit_cmp_long_long(jit, opline, op1_range, op1_addr, op2_range, op2_addr, res_addr, smar… in zend_jit_cmp()
7103 if (!ref) { in zend_jit_cmp()
7106 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7123 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7124 if (!ref) { in zend_jit_cmp()
7127 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7139 …ref = zend_jit_cmp_double_long(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7140 if (!ref) { in zend_jit_cmp()
7143 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7164 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7165 if (!ref) { in zend_jit_cmp()
7168 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7180 …ref = zend_jit_cmp_double_long(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7181 if (!ref) { in zend_jit_cmp()
7184 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7202 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7203 if (!ref) { in zend_jit_cmp()
7206 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7218 …ref = zend_jit_cmp_long_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7219 if (!ref) { in zend_jit_cmp()
7222 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7231 ir_ref op1, op2, ref; in zend_jit_cmp() local
7261 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zend_compare), op1, op2); in zend_jit_cmp()
7270 …ref = zend_jit_cmp_slow(jit, ref, opline, res_addr, smart_branch_opcode, target_label, target_labe… in zend_jit_cmp()
7271 if (!ref) { in zend_jit_cmp()
7274 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7282 ir_ref ref; in zend_jit_cmp() local
7305 ref = end_inputs->refs[0]; in zend_jit_cmp()
7306 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_cmp()
7307 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_cmp()
7353 ir_ref ref = IR_UNUSED; in zend_jit_identical() local
7448 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_identical()
7449 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_identical()
7450 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_identical()
7453 ref = jit_ZVAL_ADDR(jit, op2_addr); in zend_jit_identical()
7454 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_identical()
7455 op2_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_identical()
7460 …ref = zend_jit_cmp_long_long(jit, opline, op1_range, op1_addr, op2_range, op2_addr, res_addr, smar… in zend_jit_identical()
7461 if (!ref) { in zend_jit_identical()
7466 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_identical()
7467 if (!ref) { in zend_jit_identical()
7492 ref = ir_EQ(jit_Z_TYPE(jit, op2_addr), ir_CONST_U8(Z_TYPE_P(val))); in zend_jit_identical()
7496 ref = ir_EQ(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(Z_TYPE_P(val))); in zend_jit_identical()
7516 ref = ir_CALL_2(IR_BOOL, ir_CONST_FC_FUNC(zend_is_identical), in zend_jit_identical()
7524 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_identical()
7527 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_identical()
7539 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_identical()
7541 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_identical()
7550 ref = jit_IF_ex(jit, ref, in zend_jit_identical()
7563 ir_IF_TRUE(ref); in zend_jit_identical()
7564 ir_MERGE_WITH_EMPTY_FALSE(ref); in zend_jit_identical()
7568 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_identical()
7569 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_identical()
7584 ir_ref ref, end_inputs = IR_UNUSED, true_inputs = IR_UNUSED, false_inputs = IR_UNUSED; in zend_jit_bool_jmpznz() local
7611 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_bool_jmpznz()
7612 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_bool_jmpznz()
7613 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_bool_jmpznz()
7627 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_bool_jmpznz()
7628 zend_jit_zval_check_undef(jit, ref, opline->op1.var, opline, 0); in zend_jit_bool_jmpznz()
7724 ir_ref ref; in zend_jit_bool_jmpznz() local
7733 ref = jit_Z_LVAL(jit, op1_addr); in zend_jit_bool_jmpznz()
7735 ref = ir_NE(ref, ir_CONST_LONG(0)); in zend_jit_bool_jmpznz()
7738 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_bool_jmpznz()
7741 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7747 ir_ADD_U32(ir_ZEXT_U32(ir_NE(ref, ir_CONST_LONG(0))), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7750 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7752 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7756 ir_ref if_val = ir_IF(ref); in zend_jit_bool_jmpznz()
7775 ir_ref ref; in zend_jit_bool_jmpznz() local
7784 ref = ir_NE(jit_Z_DVAL(jit, op1_addr), ir_CONST_DOUBLE(0.0)); in zend_jit_bool_jmpznz()
7788 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_bool_jmpznz()
7791 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7797 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7800 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7802 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7806 ir_ref if_val = ir_IF(ref); in zend_jit_bool_jmpznz()
7825 ref = ir_CALL_1(IR_BOOL, ir_CONST_FC_FUNC(zend_is_true), jit_ZVAL_ADDR(jit, op1_addr)); in zend_jit_bool_jmpznz()
7833 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_bool_jmpznz()
7836 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7844 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7847 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7849 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7855 ir_ref if_val = ir_IF(ref); in zend_jit_bool_jmpznz()
7886 ir_ref ref, ref2, if_set, if_zero, if_set2; in zend_jit_defined() local
7904 ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value)); in zend_jit_defined()
7906 if_set = ir_IF(ref); in zend_jit_defined()
7912 if_set2 = ir_IF(ir_AND_A(ref, ir_CONST_ADDR(CACHE_SPECIAL))); in zend_jit_defined()
7931 ref = ir_SHR_A(ref, ir_CONST_ADDR(1)); in zend_jit_defined()
7933 ref = ir_TRUNC_U32(ref); in zend_jit_defined()
7935 …ref2 = ir_EQ(ref, ir_LOAD_U32(ir_ADD_OFFSET(ir_LOAD_A(ref2), offsetof(HashTable, nNumOfElements)))… in zend_jit_defined()
8039 ir_ref ref = jit_ZVAL_ADDR(jit, val_addr); in zend_jit_guard_fetch_result_type() local
8068 ref1 = ref; in zend_jit_guard_fetch_result_type()
8071 SET_STACK_REF_EX(stack, EX_VAR_TO_NUM(opline->result.var), ref, ZREG_ZVAL_COPY); in zend_jit_guard_fetch_result_type()
8079 ref = ir_ADD_OFFSET(jit_Z_PTR(jit, val_addr), offsetof(zend_reference, val)); in zend_jit_guard_fetch_result_type()
8080 val_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_guard_fetch_result_type()
8083 SET_STACK_REF_EX(stack, EX_VAR_TO_NUM(opline->result.var), ref, ZREG_ZVAL_COPY); in zend_jit_guard_fetch_result_type()
8098 ref = ir_PHI_2(IR_ADDR, ref, ref1); in zend_jit_guard_fetch_result_type()
8101 val_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_guard_fetch_result_type()
8121 ir_ref ref, ref2, if_set, if_special, not_set_path, special_path, fast_path; in zend_jit_fetch_constant() local
8124 ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value)); in zend_jit_fetch_constant()
8127 if_set = ir_IF(ref); in zend_jit_fetch_constant()
8134 if_special = ir_IF(ir_AND_A(ref, ir_CONST_ADDR(CACHE_SPECIAL))); in zend_jit_fetch_constant()
8154 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_fetch_constant()
8158 zend_jit_addr const_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_fetch_constant()
8174 ir_ref const_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_fetch_constant()
8287 ir_ref ref; in zend_jit_type_check() local
8314 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_type_check() local
8315 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_type_check()
8316 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_type_check()
8319 ref = ir_AND_U32(ir_SHL_U32(ir_CONST_U32(1), jit_Z_TYPE(jit, op1_addr)), ir_CONST_U32(mask)); in zend_jit_type_check()
8321 ref = ir_NE(ref, ir_CONST_U32(0)); in zend_jit_type_check()
8324 ref = ir_NE(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(type)); in zend_jit_type_check()
8326 ref = ir_EQ(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(type)); in zend_jit_type_check()
8333 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_type_check()
8335 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_type_check()
8341 ir_ref if_val = ir_IF(ref); in zend_jit_type_check()
8348 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_type_check()
8391 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_isset_isempty_cv() local
8392 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_isset_isempty_cv()
8393 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_isset_isempty_cv()
8415 ir_ref ref = ir_GT(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(IS_NULL)); in zend_jit_isset_isempty_cv() local
8418 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_isset_isempty_cv()
8420 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_isset_isempty_cv()
8423 ir_ref if_val = ir_IF(ref); in zend_jit_isset_isempty_cv()
8430 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_isset_isempty_cv()
8494 ir_ref rx, ref, top, if_enough_stack, cold_path = IR_UNUSED; local
8520 ref = ir_SUB_U32(
8528 ref = ir_SUB_U32(
8536 ref = ir_MUL_U32(ref, ir_CONST_U32(sizeof(zval)));
8538 ref = ir_SEXT_A(ref);
8540 ref = ir_SUB_A(used_stack_ref, ref);
8543 used_stack_ref = ir_PHI_2(IR_ADDR, ref, used_stack_ref);
8553 ref = ir_UGE(
8567 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
8569 if_enough_stack = ir_IF(ref);
8578 ref = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_int_extend_stack_helper), used_stack_ref);
8581 ref = func_ref;
8583 ref = ir_ADD_OFFSET(func_ref, offsetof(zend_closure, func));
8586 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_extend_stack_helper),
8587 used_stack_ref, ref);
8589 jit_STORE_IP(jit, ref);
8596 ref = jit_EG(vm_stack_top);
8612 top = jit->ctx.control = ir_emit2(&jit->ctx, IR_OPT(IR_LOAD, IR_ADDR), jit->ctx.control, ref);
8614 ir_STORE(ref, ir_ADD_A(top, used_stack_ref));
8652 ref = jit_CALL(rx, This.u1.type_info);
8654 ir_STORE(ref, ir_CONST_U32( ZEND_CALL_HAS_THIS));
8656 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), ir_CONST_U32(ZEND_CALL_HAS_THIS)));
8665 ref = jit_CALL(rx, This.u1.type_info);
8667 ir_STORE(ref, ir_CONST_U32( ZEND_CALL_HAS_THIS | ZEND_CALL_RELEASE_THIS));
8669 ir_STORE(ref,
8670 ir_OR_U32(ir_LOAD_U32(ref),
8710 ref = jit_CALL(rx, This.u1.type_info);
8711 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), call_info));
8848 ir_ref if_func, cache_slot_ref, ref; local
8867 ref = ir_HARD_COPY_A(ir_CONST_ADDR(func)); /* load constant once */
8868 ir_STORE(cache_slot_ref, ref);
8869 ref = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_init_func_run_time_cache_helper), ref);
8874 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_func_helper),
8878 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_func_helper),
8882 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_ns_func_helper),
8897 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
8898 } else if (!zend_jit_func_guard(jit, ref, func, exit_addr)) {
8903 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_undefined_function));
8907 func_ref = ir_PHI_2(IR_ADDR, ref, func_ref);
8982 ir_ref ref, ref2, if_found, fast_path, run_time_cache, this_ref2; local
8991 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); local
8992 ref = jit_ZVAL_DEREF_ref(jit, ref);
8993 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
9046 …ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->result.num + sizeof(void*…
9048 if_found = ir_IF(ref);
9054 ref = ir_EQ(
9057 if_found = ir_IF(ref);
9061 ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->result.num + sizeof(void*)));
9109 func_ref = ir_PHI_2(IR_ADDR, ref2, ref);
9214 ir_ref ref; local
9216 ref = jit_Z_PTR(jit, op2_addr);
9229 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_object, ce))),
9258 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_closure, func.op_array.opcodes))),
9269 if (!zend_jit_push_call_frame(jit, opline, NULL, func, 1, 0, checked_stack, ref, IR_UNUSED)) {
9402 ir_ref ref, ref2; local
9411 ref = jit_Z_PTR(jit, op1_addr);
9413 jit_GC_ADDREF(jit, ref);
9415 jit_set_Z_PTR(jit, arg_addr, ref);
9423 ref = jit_EMALLOC(jit, sizeof(zend_reference), op_array, opline);
9425 jit_set_GC_REFCOUNT(jit, ref, 2);
9427 …ir_STORE(ir_ADD_OFFSET(ref, offsetof(zend_reference, gc.u.type_info)), ir_CONST_U32(GC_REFERENCE));
9428 ir_STORE(ir_ADD_OFFSET(ref, offsetof(zend_reference, sources.ptr)), IR_NULL);
9429 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
9439 jit_set_Z_PTR(jit, op1_addr, ref);
9443 jit_set_Z_PTR(jit, arg_addr, ref);
9609 ir_ref ref, if_def = IR_UNUSED; local
9618 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper),
9625 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_exception_handler));
9668 ir_ref ref; local
9671 ref = jit_ZVAL_ADDR(jit, op1_addr);
9672 ref = jit_ZVAL_DEREF_ref(jit, ref);
9673 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
9681 ir_ref if_ref, ref, ref2, refcount, if_not_zero, if_refcounted; local
9689 ref = jit_Z_PTR(jit, op1_addr);
9690 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
9700 refcount = jit_GC_DELREF(jit, ref);
9716 jit_EFREE(jit, ref, sizeof(zend_reference), op_array, opline);
9756 ir_ref ref; local
9767 ref = jit_IP(jit);
9769 ref = ir_LOAD_A(jit_EX(call));
9771 ref = jit_CALL(ref, This.u1.type_info);
9772 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), ir_CONST_U32(ZEND_CALL_SEND_ARG_BY_REF)));
9779 ref = jit_IP(jit);
9781 ref = ir_LOAD_A(jit_EX(call));
9783 ref = jit_CALL(ref, This.u1.type_info);
9784 ir_STORE(ref, ir_AND_U32(ir_LOAD_U32(ref), ir_CONST_U32(~ZEND_CALL_SEND_ARG_BY_REF)));
9798 ref = ir_AND_U32(
9801 if_ref = ir_IF(ref);
9805 ref = jit_CALL(rx, This.u1.type_info);
9806 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), ir_CONST_U32(ZEND_CALL_SEND_ARG_BY_REF)));
9812 ref = jit_CALL(rx, This.u1.type_info);
9813 ir_STORE(ref, ir_AND_U32(ir_LOAD_U32(ref), ir_CONST_U32(~ZEND_CALL_SEND_ARG_BY_REF)));
10181 ir_ref ref = ir_MUL_U32(num_args, ir_CONST_U32(sizeof(zend_op))); local
10184 ref = ir_ZEXT_A(ref);
10188 jit_STORE_IP(jit, ir_ADD_A(jit_IP(jit), ref));
10192 ir_STORE(addr, ir_ADD_A(ir_LOAD_A(addr), ref));
10316 ir_ref ref; local
10321 ref = jit->ctx.insns_count - 1;
10322 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_UNREACHABLE
10323 || jit->ctx.ir_base[ref].op == IR_RETURN
10324 || jit->ctx.ir_base[ref].op == IR_LOOP_END);
10326 ref = zend_jit_continue_entry(jit, ref, jit->ssa->cfg.blocks[succ].start);
10328 _zend_jit_add_predecessor_ref(jit, succ, jit->b, ref);
10331 user_path = ref;
10596 ir_ref ref, fast_path = IR_UNUSED; local
10598 ref = jit_ZVAL_ADDR(jit, res_addr);
10612 ref = jit_ZVAL_DEREF_ref(jit, ref);
10614 ref = jit_Z_PTR_ref(jit, ref);
10615 ref = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
10622 ir_ref if_ok = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(type_code));
10628 ir_SHL_U32(ir_CONST_U32(1), jit_Z_TYPE_ref(jit, ref)),
10637 ref = ir_CALL_2(IR_BOOL, ir_CONST_FC_FUNC(zend_jit_verify_arg_slow),
10638 ref, ir_CONST_ADDR(arg_info));
10641 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_exception_handler));
10706 ir_ref ref, if_fail, skip_path = IR_UNUSED; local
10733 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zval_update_constant_ex),
10737 if_fail = ir_IF(ref);
10803 ir_ref ref; local
10806 ref = jit_ZVAL_ADDR(jit, op1_addr);
10808 ref = zend_jit_zval_check_undef(jit, ref, opline->op1.var, NULL, 1);
10812 ref,
10892 ir_ref call_info = IR_UNUSED, ref, cold_path = IR_UNUSED; local
10903 ref = ir_AND_U32(call_info,
10906 ir_ref if_slow = ir_IF(ref);
10910 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(zend_jit_leave_func_helper), jit_FP(jit));
10926 ir_GUARD(ir_GE(ref, ir_CONST_I32(0)), jit_STUB_ADDR(jit, jit_stub_trace_halt));
10937 ir_GUARD_NOT(ref, jit_STUB_ADDR(jit, jit_stub_leave_function_handler));
11010 ir_ref ref = jit_EX(opline); local
11012 ir_STORE(ref, ir_ADD_OFFSET(ir_LOAD_A(ref), sizeof(zend_op)));
11080 ir_ref ref = jit_EX(opline); local
11082 ir_STORE(ref, ir_ADD_OFFSET(ir_LOAD_A(ref), sizeof(zend_op)));
11107 ir_ref return_value = IR_UNUSED, ref, refcount, if_return_value_used = IR_UNUSED; local
11153 ref = jit_Z_PTR(jit, op1_addr);
11154 refcount = jit_GC_DELREF(jit, ref);
11163 jit_ZVAL_DTOR(jit, ref, op1_info, opline);
11197 ref = jit_ZVAL_ADDR(jit, op1_addr);
11198 ref = jit_ZVAL_DEREF_ref(jit, ref);
11199 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
11226 ref = jit_Z_PTR(jit, op1_addr);
11229 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
11232 ref2 = jit_GC_DELREF(jit, ref);
11249 jit_EFREE(jit, ref, sizeof(zend_reference), op_array, opline);
11275 ir_ref cache_slot_ref, idx_ref, num_used_ref, bucket_ref, ref, ref2; local
11308 ref = jit_Z_PTR_ref(jit, bucket_ref);
11309 jit_GC_ADDREF(jit, ref);
11319 ref = ir_PHI_2(IR_ADDR, ref2, ref);
11334 jit_set_Z_PTR(jit, op1_addr, ref);
11369 jit_set_Z_PTR(jit, op1_addr, ref);
11390 ir_ref ref, if_array, if_exists, end_inputs = IR_UNUSED; local
11398 ref = ir_LOAD_U32(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(zval, u2.fe_iter_idx)));
11399 if_exists = ir_IF(ir_EQ(ref, ir_CONST_U32(-1)));
11404 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_hash_iterator_del), ref);
11441 ir_ref ref; local
11447 ref = jit_Z_PTR(jit, op1_addr);
11449 ir_ADD_OFFSET(ref, offsetof(zend_string, val)),
11450 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_string, len))));
11478 ir_ref ref; local
11482 ref = jit_Z_PTR(jit, op1_addr);
11483 ref = ir_LOAD_L(ir_ADD_OFFSET(ref, offsetof(zend_string, len)));
11484 jit_set_Z_LVAL(jit, res_addr, ref);
11515 ir_ref ref; local
11520 ref = jit_Z_PTR(jit, op1_addr);
11522 ref = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(HashTable, nNumOfElements)));
11523 ref = ir_ZEXT_L(ref);
11525 ref = ir_LOAD_L(ir_ADD_OFFSET(ref, offsetof(HashTable, nNumOfElements)));
11527 jit_set_Z_LVAL(jit, res_addr, ref);
11549 ir_ref ref; local
11556 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find),
11562 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find_known_hash),
11568 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
11570 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr));
11578 ref = jit_IF_ex(jit, ref,
11580 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref);
11581 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref);
11585 ir_ADD_U32(ir_ZEXT_U32(ir_NE(ref, IR_NULL)), ir_CONST_U32(IS_FALSE)));
11609 ir_ref ref; local
11613 ref = jit_Z_PTR(jit, op2_addr);
11614 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), offset), ref);
11620 jit_GC_ADDREF(jit, ref);
11630 ir_ref ref; local
11632 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_rope_end),
11636 jit_set_Z_PTR(jit, res_addr, ref);
11774 ir_ref ref = IR_UNUSED, cond, if_found; local
11860 ref = ir_LOAD_U32(ir_ADD_OFFSET(ht_ref, offsetof(zend_array, nNumUsed)));
11865 cond = ir_ULT(ir_TRUNC_U32(h), ref);
11867 cond = ir_ULT(h, ir_ZEXT_L(ref));
11870 cond = ir_ULT(h, ref);
11899 ref = ir_MUL_L(h, ir_CONST_LONG(sizeof(zval)));
11900 ref = ir_BITCAST_A(ref);
11901 ref = ir_ADD_A(ir_LOAD_A(ir_ADD_OFFSET(ht_ref, offsetof(zend_array, arPacked))), ref);
11903 ir_refs_add(test_zval_values, ref);
11921 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(_zend_hash_index_find), ht_ref, h);
11923 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_index_find), ht_ref, h);
11926 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
11928 if_found = ir_IF(ref);
11933 ir_refs_add(test_zval_values, ref);
11943 ir_ref type_ref = jit_Z_TYPE_ref(jit, ref);
11958 ir_refs_add(found_vals, ref);
11971 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(_zend_hash_index_find), ht_ref, h);
11973 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_index_find), ht_ref, h);
11976 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
11978 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
11980 if_found = ir_IF(ref);
11985 if_found = ir_IF(ref);
11991 ir_refs_add(found_vals, ref);
12044 ir_refs_add(found_vals, ref);
12046 ir_ref if_def = ir_IF(jit_Z_TYPE_ref(jit, ref));
12049 ir_refs_add(found_vals, ref);
12071 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_hash_index_lookup_rw_no_packed),
12074 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_hash_index_lookup_rw), ht_ref, h);
12077 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12079 if_found = ir_IF(ref);
12085 ir_refs_add(found_vals, ref);
12090 ir_ref if_def = ir_IF(jit_Z_TYPE_ref(jit, ref));
12093 ir_refs_add(found_vals, ref);
12110 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_index_lookup), ht_ref, h);
12112 ir_refs_add(found_vals, ref);
12148 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_find), ht_ref, key);
12153 ref = ir_PHI_2(IR_ADDR, ref2, ref);
12155 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find_known_hash), ht_ref, key);
12158 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12160 if_found = ir_IF(ref);
12165 ir_refs_add(test_zval_values, ref);
12179 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_find), ht_ref, key);
12184 ref = ir_PHI_2(IR_ADDR, ref2, ref);
12186 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find_known_hash), ht_ref, key);
12189 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
12191 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12193 if_found = ir_IF(ref);
12198 if_found = ir_IF(ref);
12220 ir_refs_add(found_vals, ref);
12224 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_lookup_rw), ht_ref, key);
12226 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_hash_lookup_rw), ht_ref, key);
12229 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12231 if_found = ir_IF(ref);
12237 ir_refs_add(found_vals, ref);
12241 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_lookup_w), ht_ref, key);
12243 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_lookup), ht_ref, key);
12246 ir_refs_add(found_vals, ref);
12261 ref = jit_ZVAL_ADDR(jit, op2_addr);
12266 ref,
12271 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zend_jit_fetch_dim_isset_helper), ht_ref, ref);
12273 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12276 ir_GUARD_NOT(ref, ir_CONST_ADDR(found_exit_addr));
12279 if_found = ir_IF(ref);
12290 ref,
12295 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_rw_helper), ht_ref, ref);
12296 if_found = ir_IF(ref);
12299 ir_refs_add(found_vals, ref);
12304 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_w_helper), ht_ref, ref);
12305 if_found = ir_IF(ref);
12308 ir_refs_add(found_vals, ref);
12327 ref = ir_PHI_N(IR_ADDR, test_zval_values->count, test_zval_values->refs);
12330 ref = jit_ZVAL_DEREF_ref(jit, ref);
12332 cond = ir_GT(jit_Z_TYPE_ref(jit, ref), ir_CONST_U8(IS_NULL));
12449 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); local
12450 ref = jit_ZVAL_DEREF_ref(jit, ref);
12451 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
12455 ir_ref ht_ref, ref; local
12488 ref = ir_PHI_N(IR_ADDR, found_vals->count, found_vals->refs);
12489 val_addr = ZEND_ADDR_REF_ZVAL(ref);
12564 ir_ref ref; local
12567 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_str_offset_r_helper),
12570 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_str_r_helper),
12573 jit_set_Z_PTR(jit, res_addr, ref);
12647 ir_ref ref; local
12651 ref = jit_ZVAL_ADDR(jit, orig_op1_addr);
12654 ref = jit_ZVAL_ADDR(jit, op1_addr);
12656 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_invalid_array_access), ref);
12707 ir_ref ref = IR_UNUSED; local
12714 ref = jit_ZVAL_ADDR(jit, op1_addr);
12723 array_reference_ref = ir_ADD_OFFSET(jit_Z_PTR_ref(jit, ref), offsetof(zend_reference, val));
12731 ref2 = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_prepare_assign_dim_ref), ref);
12735 ref = ir_PHI_2(IR_ADDR, ref2, ref);
12736 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
12740 ir_ref op1_ref = ref;
12748 op1_ref = ir_PHI_2(IR_ADDR, ref, array_reference_ref);
12751 ref = jit_Z_PTR_ref(jit, op1_ref);
12754 ir_ref if_refcount_1 = ir_IF(ir_EQ(jit_GC_REFCOUNT(jit, ref), ir_CONST_U32(1)));
12757 ir_refs_add(array_values, ref);
12760 ref = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_zval_array_dup), op1_ref);
12764 ir_refs_add(array_values, ref);
12794 ref = ir_CALL_1(IR_ADDR,
12799 ir_refs_add(array_values, ref);
12805 ref = ir_PHI_N(IR_ADDR, array_values->count, array_values->refs);
12808 *ht_ref = ref;
12824 ir_ref ref, if_type = IR_UNUSED, ht_ref; local
12843 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_next_index_insert),
12847 if_ok = ir_IF(ref);
12856 jit_set_Z_PTR(jit, res_addr, ref);
12903 ref = ir_PHI_N(IR_ADDR, found_vals->count, found_vals->refs);
12904 jit_set_Z_PTR(jit, res_addr, ref);
13015 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); local
13016 ref = jit_ZVAL_DEREF_ref(jit, ref);
13017 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
13065 ir_ref ref, arg1, arg2, if_true; local
13075 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zend_jit_isset_dim_helper), arg1, arg2);
13076 if_true = ir_IF(ref);
13226 ir_ref if_ok, ref; local
13230 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_next_index_insert),
13234 if_ok = ir_IF(ref);
13244 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13251 ir_ref ref; local
13272 ref = ir_PHI_N(IR_ADDR, found_values->count, found_values->refs);
13273 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13384 && jit->ra[Z_SSA_VAR(op3_addr)].ref == IR_NULL) {
13395 ir_ref if_ok, ref; local
13398 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_next_index_insert),
13402 if_ok = ir_IF(ref);
13411 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13413 ir_ref ref; local
13447 ref = ir_PHI_N(IR_ADDR, found_values->count, found_values->refs);
13448 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13456 ir_ref if_ref, if_typed, noref_path, ref_path, ref, reference, ref2, arg2; local
13458 ref = jit_ZVAL_ADDR(jit, var_addr);
13464 reference = jit_Z_PTR_ref(jit, ref);
13478 ref = ir_PHI_2(IR_ADDR, ref, ref2);
13479 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13597 ir_ref ref; local
13603 ref = ir_AND_U32(
13607 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
13609 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr));
13618 …ir_ref ref, ht_ref, hash_pos_ref, packed_pos_ref, hash_p_ref = IR_UNUSED, packed_p_ref = IR_UNUSED… local
13656 ref = ir_AND_U32(
13659 if_packed = ir_IF(ref);
13665 ref = ir_ZEXT_A(hash_pos_ref);
13667 ref = ir_BITCAST_A(hash_pos_ref);
13670 ir_MUL_A(ref, ir_CONST_ADDR(sizeof(Bucket))),
13678 ref = ir_ULT(hash_pos_ref,
13686 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
13688 ir_ref if_fit = ir_IF(ref);
13694 ir_ref if_fit = ir_IF(ref);
13728 ref = ir_ZEXT_A(packed_pos_ref);
13730 ref = ir_BITCAST_A(packed_pos_ref);
13733 ir_MUL_A(ref, ir_CONST_ADDR(sizeof(zval))),
13741 ref = ir_ULT(packed_pos_ref,
13748 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
13750 ir_ref if_fit = ir_IF(ref);
13756 ir_ref if_fit = ir_IF(ref);
13815 ref = ir_AND_U32(
13818 if_interned = ir_IF(ref);
13840 ref = ir_LOAD_L(ir_ADD_OFFSET(hash_p_ref, offsetof(Bucket, h)));
13841 jit_set_Z_LVAL(jit, res_addr, ref);
13933 ref = exit_inputs;
13936 ref = ir_END();
13938 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref);
13953 ir_ref ref = jit_Z_PTR(jit, this_addr); local
13955 jit_set_Z_PTR(jit, var_addr, ref);
13957 jit_GC_ADDREF(jit, ref);
14156 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG… local
14157 ir_ref if_same = ir_IF(ir_EQ(ref,
14246 ref = jit_Z_PTR(jit, prop_addr);
14247 jit_GC_ADDREF(jit, ref);
14248 jit_set_Z_PTR(jit, res_addr, ref);
14312 ir_ref ref = jit_Z_PTR(jit, prop_addr); local
14313 jit_GC_ADDREF(jit, ref);
14314 jit_set_Z_PTR(jit, res_addr, ref);
14335 ir_ref ref = jit_Z_PTR(jit, prop_addr); local
14336 jit_GC_ADDREF(jit, ref);
14337 jit_set_Z_PTR(jit, res_addr, ref);
14368 ir_ref ref; local
14377 ref = ir_CONST_ADDR(prop_info);
14382 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
14383 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
14384 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
14388 ref,
14672 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG… local
14673 ir_ref if_same = ir_IF(ir_EQ(ref, ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)))));
14769 ir_ref ref, arg3, arg4; local
14774 ref = ir_CONST_ADDR(prop_info);
14779 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
14780 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
14781 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
14802 ref,
15027 && jit->ra[Z_SSA_VAR(val_addr)].ref == IR_NULL) {
15034 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, (opline+1)->extended_value & ~ZEND_FETCH_OBJ_… local
15035 ir_ref if_same = ir_IF(ir_EQ(ref, ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)))));
15089 ir_ref if_ref, if_typed, noref_path, ref_path, reference, ref, arg2; local
15111 ref = ir_ADD_OFFSET(reference, offsetof(zend_reference, val));
15125 prop_ref = ir_PHI_2(IR_ADDR, prop_ref, ref);
15130 ref = ir_CONST_ADDR(prop_info);
15135 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
15136 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
15137 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
15142 ref,
15167 ir_ref if_ref, if_typed, noref_path, ref_path, reference, ref, arg2; local
15177 ref = ir_ADD_OFFSET(reference, offsetof(zend_reference, val));
15202 prop_ref = ir_PHI_2(IR_ADDR, prop_ref, ref);
15457 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG… local
15458 ir_ref if_same = ir_IF(ir_EQ(ref, ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)))));
15514 ir_ref ref; local
15520 ref = ir_CONST_ADDR(prop_info);
15525 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
15526 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
15527 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
15544 ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(func), prop_ref, ref);
15564 ref,
15590 ir_ref if_ref, if_typed, noref_path, ref_path, reference, ref; local
15598 ref = ir_ADD_OFFSET(reference, offsetof(zend_reference, val));
15630 prop_ref = ir_PHI_2(IR_ADDR, prop_ref, ref);
15637 ir_ref addr, ref; local
15645 ref = ir_LOAD_L(addr);
15648 jit_set_Z_LVAL(jit, res_addr, ref);
15653 ref = ir_ADD_OV_L(ref, ir_CONST_LONG(1));
15655 ref = ir_SUB_OV_L(ref, ir_CONST_LONG(1));
15658 ir_STORE(addr, ref);
15659 if_overflow = ir_IF(ir_OVERFLOW(ref));
15664 jit_set_Z_LVAL(jit, res_addr, ref);
15910 ir_ref ref, if_long, fast_path, ref2; local
15912 ref = jit_ZVAL_ADDR(jit, op1_addr);
15941 ref = ir_PHI_2(IR_ADDR, ref, ref2);
15942 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
15953 ir_ref ref = jit_Z_LVAL(jit, op1_addr); local
15956 ref = ir_CALL_2(IR_LONG, ir_CONST_FC_FUNC(zend_hash_index_find),
15957 ir_CONST_ADDR(jumptable), ref);
15958 ref = ir_SUB_L(ref, ir_CONST_LONG((uintptr_t)jumptable->arData));
15961 ref = ir_SHR_L(ref, ir_CONST_LONG(5));
15963 ref = ir_DIV_L(ref, ir_CONST_LONG(sizeof(Bucket)));
15966 ref = ir_SWITCH(ref);
15980 ir_CASE_VAL(ref, idx);
15993 ir_CASE_DEFAULT(ref);
16009 _zend_jit_add_predecessor_ref(jit, b, jit->b, ref);
16012 _zend_jit_add_predecessor_ref(jit, default_b, jit->b, ref);
16037 ir_ref ref, if_string, fast_path, ref2; local
16039 ref = jit_ZVAL_ADDR(jit, op1_addr);
16068 ref = ir_PHI_2(IR_ADDR, ref, ref2);
16069 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
16081 ir_ref ref = jit_Z_PTR(jit, op1_addr); local
16082 ref = ir_CALL_2(IR_LONG, ir_CONST_FC_FUNC(zend_hash_find),
16083 ir_CONST_ADDR(jumptable), ref);
16084 ref = ir_SUB_L(ref, ir_CONST_LONG((uintptr_t)jumptable->arData));
16087 ref = ir_SHR_L(ref, ir_CONST_LONG(5));
16089 ref = ir_DIV_L(ref, ir_CONST_LONG(sizeof(Bucket)));
16091 ref = ir_SWITCH(ref);
16105 ir_CASE_VAL(ref, idx);
16118 ir_CASE_DEFAULT(ref);
16134 _zend_jit_add_predecessor_ref(jit, b, jit->b, ref);
16136 _zend_jit_add_predecessor_ref(jit, default_b, jit->b, ref);
16148 ir_ref if_type = IR_UNUSED, default_input_list = IR_UNUSED, ref = IR_UNUSED; local
16176 ref = jit_Z_LVAL(jit, op1_addr);
16177 ref = ir_CALL_2(IR_LONG, ir_CONST_FC_FUNC(zend_hash_index_find),
16178 ir_CONST_ADDR(jumptable), ref);
16211 ref = ir_PHI_2(IR_LONG, ref2, ref);
16213 ref = ref2;
16217 ref = ir_SUB_L(ref, ir_CONST_LONG((uintptr_t)jumptable->arData));
16221 ref = ir_SHR_L(ref, ir_CONST_LONG(4));
16224 ref = ir_SHR_L(ref, ir_CONST_LONG(5));
16226 ref = ir_DIV_L(ref, ir_CONST_LONG(sizeof(Bucket)));
16229 ref = ir_SWITCH(ref);
16241 ir_CASE_VAL(ref, idx);
16254 ir_CASE_DEFAULT(ref);
16264 _zend_jit_add_predecessor_ref(jit, b, jit->b, ref);
16266 _zend_jit_add_predecessor_ref(jit, default_b, jit->b, ref);
16318 if (jit->ctx.ir_base[ref].op == IR_SWITCH) {
16319 ZEND_ASSERT(jit->ctx.ir_base[ref].op3 == IR_UNUSED);
16320 jit->ctx.ir_base[ref].op3 = default_input_list;
16357 ir_ref ref = ir_PARAM(IR_ADDR, "execute_data", 1); local
16358 jit_STORE_FP(jit, ref);
16470 stack->ref = ir_get_spill_slot_offset(&jit->ctx, stack->ref);
16582 ir_ref ref; local
16592 ref = jit_Z_TYPE(jit, var_addr);
16593 ir_GUARD(ir_EQ(ref, ir_CONST_U8(IS_REFERENCE)), ir_CONST_ADDR(exit_addr));
16596 ref = jit_Z_PTR(jit, var_addr);
16597 *ref_addr_ptr = ZEND_ADDR_REF_ZVAL(ref);
16598 ref = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
16599 var_addr = ZEND_ADDR_REF_ZVAL(ref);
16616 ir_ref ref; local
16628 ref = jit_Z_TYPE(jit, var_addr);
16629 ir_GUARD(ir_EQ(ref, ir_CONST_U8(IS_REFERENCE)), ir_CONST_ADDR(exit_addr));
16637 ref = jit_Z_PTR(jit, var_addr);
16638 ref = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
16639 var_addr = ZEND_ADDR_REF_ZVAL(ref);
16649 ref = jit_Z_TYPE(jit, var_addr);
16650 ir_GUARD(ir_EQ(ref, ir_CONST_U8(var_type)), ir_CONST_ADDR(exit_addr));
16677 ir_ref ref = IR_UNUSED; local
16687 ref = jit_Z_PTR(jit, var_addr);
16691 ref = jit_Z_PTR(jit, var_addr);
16694 var_addr = ZEND_ADDR_REF_ZVAL(ref);
16735 ir_ref ref; local
16741 ref = jit_FP(jit);
16742 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref);
16785 ir_GUARD(ir_GE(ref, ir_CONST_I32(0)), jit_STUB_ADDR(jit, jit_stub_trace_halt));
16921 ir_ref ref = ir_PARAM(IR_ADDR, "execute_data", 1); local
16922 jit_STORE_FP(jit, ref);
16957 ir_ref ref = ir_RLOAD(type, reg); local
16966 ir_set_op(&jit->ctx, ref, 3, EX_NUM_TO_VAR(i));
16993 ir_ref ref; local
16996 ZEND_ASSERT(jit->ra[src_var].ref != IR_UNUSED && jit->ra[src_var].ref != IR_NULL);
16998 ref = ir_PHI_2(
17003 ZEND_ASSERT(jit->ra[src_var].ref == IR_NULL);
17006 zend_jit_def_reg(jit, ZEND_ADDR_REG(dst_var), ref);
17029 ir_ref ref; local
17035 ref = ir_CALL_1(IR_I32, addr, jit_FP(jit));
17043 ir_RETURN(ref);