Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7111480

Browse files
committed
Fix the ordering of zend_jit_return to match ZEND_RETURN_SPEC_OBSERVER
1 parent acf758d commit 7111480

File tree

2 files changed

+32
-40
lines changed

2 files changed

+32
-40
lines changed

‎ext/opcache/jit/zend_jit_arm64.dasc‎

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10877,21 +10877,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1087710877
return_value_used = -1;
1087810878
}
1087910879

10880-
if (ZEND_OBSERVER_ENABLED) {
10881-
if (Z_MODE(op1_addr) == IS_REG) {
10882-
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
10883-
10884-
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
10885-
return 0;
10886-
}
10887-
op1_addr = dst;
10888-
}
10889-
| LOAD_ZVAL_ADDR FCARG2x, op1_addr
10890-
| mov FCARG1x, FP
10891-
| SET_EX_OPLINE opline, REG0
10892-
| EXT_CALL zend_observer_fcall_end, REG0
10893-
}
10894-
1089510880
// if (!EX(return_value))
1089610881
if (Z_MODE(op1_addr) == IS_REG && Z_REG(op1_addr) == ZREG_REG1) {
1089710882
if (return_value_used != 0) {
@@ -10951,11 +10936,8 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1095110936
}
1095210937

1095310938
if (return_value_used == 0) {
10954-
|9:
10955-
return 1;
10956-
}
10957-
10958-
if (opline->op1_type == IS_CONST) {
10939+
/* pass */
10940+
} else if (opline->op1_type == IS_CONST) {
1095910941
zval *zv = RT_CONSTANT(opline, opline->op1);
1096010942
| ZVAL_COPY_CONST ret_addr, MAY_BE_ANY, MAY_BE_ANY, zv, ZREG_REG0, ZREG_TMP1, ZREG_FPR0
1096110943
if (Z_REFCOUNTED_P(zv)) {
@@ -11021,6 +11003,20 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1102111003
}
1102211004

1102311005
|9:
11006+
if (ZEND_OBSERVER_ENABLED) {
11007+
if (Z_MODE(op1_addr) == IS_REG) {
11008+
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11009+
11010+
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
11011+
return 0;
11012+
}
11013+
op1_addr = dst;
11014+
}
11015+
| LOAD_ZVAL_ADDR FCARG2x, op1_addr
11016+
| mov FCARG1x, FP
11017+
| SET_EX_OPLINE opline, REG0
11018+
| EXT_CALL zend_observer_fcall_end, REG0
11019+
}
1102411020
return 1;
1102511021
}
1102611022

‎ext/opcache/jit/zend_jit_x86.dasc‎

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11584,21 +11584,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1158411584
return_value_used = -1;
1158511585
}
1158611586

11587-
if (ZEND_OBSERVER_ENABLED) {
11588-
if (Z_MODE(op1_addr) == IS_REG) {
11589-
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11590-
11591-
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
11592-
return 0;
11593-
}
11594-
op1_addr = dst;
11595-
}
11596-
| LOAD_ZVAL_ADDR FCARG2a, op1_addr
11597-
| mov FCARG1a, FP
11598-
| SET_EX_OPLINE opline, r0
11599-
| EXT_CALL zend_observer_fcall_end, r0
11600-
}
11601-
1160211587
// if (!EX(return_value))
1160311588
if (Z_MODE(op1_addr) == IS_REG && Z_REG(op1_addr) == ZREG_R1) {
1160411589
if (return_value_used != 0) {
@@ -11664,11 +11649,8 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1166411649
}
1166511650

1166611651
if (return_value_used == 0) {
11667-
|9:
11668-
return 1;
11669-
}
11670-
11671-
if (opline->op1_type == IS_CONST) {
11652+
/* pass */
11653+
} else if (opline->op1_type == IS_CONST) {
1167211654
zval *zv = RT_CONSTANT(opline, opline->op1);
1167311655
| ZVAL_COPY_CONST ret_addr, MAY_BE_ANY, MAY_BE_ANY, zv, ZREG_R0
1167411656
if (Z_REFCOUNTED_P(zv)) {
@@ -11733,6 +11715,20 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1173311715
}
1173411716

1173511717
|9:
11718+
if (ZEND_OBSERVER_ENABLED) {
11719+
if (Z_MODE(op1_addr) == IS_REG) {
11720+
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11721+
11722+
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
11723+
return 0;
11724+
}
11725+
op1_addr = dst;
11726+
}
11727+
| LOAD_ZVAL_ADDR FCARG2a, op1_addr
11728+
| mov FCARG1a, FP
11729+
| SET_EX_OPLINE opline, r0
11730+
| EXT_CALL zend_observer_fcall_end, r0
11731+
}
1173611732
return 1;
1173711733
}
1173811734

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /