Skip to content

Commit 547efec

Browse files
committed
Fix JIT
1 parent a7df3da commit 547efec

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16646,24 +16646,19 @@ static bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa *ssa,
1664616646

1664716647
static void jit_frameless_icall0(zend_jit_ctx *jit, const zend_op *opline)
1664816648
{
16649-
if (GCC_GLOBAL_REGS) {
16650-
// EX(opline) = opline
16651-
ir_STORE(jit_EX(opline), jit_IP(jit));
16652-
}
16649+
jit_SET_EX_OPLINE(jit, opline);
1665316650

1665416651
void *function = zend_flf_handlers[opline->extended_value];
1665516652
zend_jit_addr res_addr = RES_ADDR();
1665616653
ir_ref res_ref = jit_ZVAL_ADDR(jit, res_addr);
16654+
jit_set_Z_TYPE_INFO(jit, res_addr, IS_NULL);
1665716655
ir_CALL_1(IR_VOID, ir_CONST_ADDR((size_t)function), res_ref);
1665816656
zend_jit_check_exception(jit);
1665916657
}
1666016658

1666116659
static void jit_frameless_icall1(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info)
1666216660
{
16663-
if (GCC_GLOBAL_REGS) {
16664-
// EX(opline) = opline
16665-
ir_STORE(jit_EX(opline), jit_IP(jit));
16666-
}
16661+
jit_SET_EX_OPLINE(jit, opline);
1666716662

1666816663
void *function = zend_flf_handlers[opline->extended_value];
1666916664
zend_jit_addr res_addr = RES_ADDR();
@@ -16672,17 +16667,15 @@ static void jit_frameless_icall1(zend_jit_ctx *jit, const zend_op *opline, uint3
1667216667
ir_ref op1_ref = jit_ZVAL_ADDR(jit, op1_addr);
1667316668
zend_jit_zval_check_undef(jit, op1_ref, opline->op1.var, opline, 1);
1667416669
op1_ref = jit_ZVAL_DEREF_ref(jit, op1_ref);
16670+
jit_set_Z_TYPE_INFO(jit, res_addr, IS_NULL);
1667516671
ir_CALL_2(IR_VOID, ir_CONST_ADDR((size_t)function), res_ref, op1_ref);
1667616672
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
1667716673
zend_jit_check_exception(jit);
1667816674
}
1667916675

1668016676
static void jit_frameless_icall2(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint32_t op2_info)
1668116677
{
16682-
if (GCC_GLOBAL_REGS) {
16683-
// EX(opline) = opline
16684-
ir_STORE(jit_EX(opline), jit_IP(jit));
16685-
}
16678+
jit_SET_EX_OPLINE(jit, opline);
1668616679

1668716680
void *function = zend_flf_handlers[opline->extended_value];
1668816681
zend_jit_addr res_addr = RES_ADDR();
@@ -16695,6 +16688,7 @@ static void jit_frameless_icall2(zend_jit_ctx *jit, const zend_op *opline, uint3
1669516688
zend_jit_zval_check_undef(jit, op2_ref, opline->op2.var, opline, 1);
1669616689
op1_ref = jit_ZVAL_DEREF_ref(jit, op1_ref);
1669716690
op2_ref = jit_ZVAL_DEREF_ref(jit, op2_ref);
16691+
jit_set_Z_TYPE_INFO(jit, res_addr, IS_NULL);
1669816692
ir_CALL_3(IR_VOID, ir_CONST_ADDR((size_t)function), res_ref, op1_ref, op2_ref);
1669916693
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
1670016694
jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL);
@@ -16703,10 +16697,7 @@ static void jit_frameless_icall2(zend_jit_ctx *jit, const zend_op *opline, uint3
1670316697

1670416698
static void jit_frameless_icall3(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint32_t op2_info, uint32_t op1_data_info)
1670516699
{
16706-
if (GCC_GLOBAL_REGS) {
16707-
// EX(opline) = opline
16708-
ir_STORE(jit_EX(opline), jit_IP(jit));
16709-
}
16700+
jit_SET_EX_OPLINE(jit, opline);
1671016701

1671116702
void *function = zend_flf_handlers[opline->extended_value];
1671216703
zend_jit_addr res_addr = RES_ADDR();
@@ -16723,6 +16714,7 @@ static void jit_frameless_icall3(zend_jit_ctx *jit, const zend_op *opline, uint3
1672316714
op1_ref = jit_ZVAL_DEREF_ref(jit, op1_ref);
1672416715
op2_ref = jit_ZVAL_DEREF_ref(jit, op2_ref);
1672516716
op3_ref = jit_ZVAL_DEREF_ref(jit, op3_ref);
16717+
jit_set_Z_TYPE_INFO(jit, res_addr, IS_NULL);
1672616718
ir_CALL_4(IR_VOID, ir_CONST_ADDR((size_t)function), res_ref, op1_ref, op2_ref, op3_ref);
1672716719
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
1672816720
jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL);

0 commit comments

Comments
 (0)