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 a969f70

Browse files
committed
Fix the ordering of zend_jit_return to match ZEND_RETURN_SPEC_OBSERVER
fix ident
1 parent 70861c8 commit a969f70

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
@@ -10903,21 +10903,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1090310903
return_value_used = -1;
1090410904
}
1090510905

10906-
if (ZEND_OBSERVER_ENABLED) {
10907-
if (Z_MODE(op1_addr) == IS_REG) {
10908-
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
10909-
10910-
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
10911-
return 0;
10912-
}
10913-
op1_addr = dst;
10914-
}
10915-
| LOAD_ZVAL_ADDR FCARG2x, op1_addr
10916-
| mov FCARG1x, FP
10917-
| SET_EX_OPLINE opline, REG0
10918-
| EXT_CALL zend_observer_fcall_end, REG0
10919-
}
10920-
1092110906
// if (!EX(return_value))
1092210907
if (Z_MODE(op1_addr) == IS_REG && Z_REG(op1_addr) == ZREG_REG1) {
1092310908
if (return_value_used != 0) {
@@ -10977,11 +10962,8 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1097710962
}
1097810963

1097910964
if (return_value_used == 0) {
10980-
|9:
10981-
return 1;
10982-
}
10983-
10984-
if (opline->op1_type == IS_CONST) {
10965+
/* pass */
10966+
} else if (opline->op1_type == IS_CONST) {
1098510967
zval *zv = RT_CONSTANT(opline, opline->op1);
1098610968
| ZVAL_COPY_CONST ret_addr, MAY_BE_ANY, MAY_BE_ANY, zv, ZREG_REG0, ZREG_TMP1, ZREG_FPR0
1098710969
if (Z_REFCOUNTED_P(zv)) {
@@ -11047,6 +11029,20 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1104711029
}
1104811030

1104911031
|9:
11032+
if (ZEND_OBSERVER_ENABLED) {
11033+
if (Z_MODE(op1_addr) == IS_REG) {
11034+
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11035+
11036+
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
11037+
return 0;
11038+
}
11039+
op1_addr = dst;
11040+
}
11041+
| LOAD_ZVAL_ADDR FCARG2x, op1_addr
11042+
| mov FCARG1x, FP
11043+
| SET_EX_OPLINE opline, REG0
11044+
| EXT_CALL zend_observer_fcall_end, REG0
11045+
}
1105011046
return 1;
1105111047
}
1105211048

‎ext/opcache/jit/zend_jit_x86.dasc‎

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

11621-
if (ZEND_OBSERVER_ENABLED) {
11622-
if (Z_MODE(op1_addr) == IS_REG) {
11623-
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11624-
11625-
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
11626-
return 0;
11627-
}
11628-
op1_addr = dst;
11629-
}
11630-
| LOAD_ZVAL_ADDR FCARG2a, op1_addr
11631-
| mov FCARG1a, FP
11632-
| SET_EX_OPLINE opline, r0
11633-
| EXT_CALL zend_observer_fcall_end, r0
11634-
}
11635-
1163611621
// if (!EX(return_value))
1163711622
if (Z_MODE(op1_addr) == IS_REG && Z_REG(op1_addr) == ZREG_R1) {
1163811623
if (return_value_used != 0) {
@@ -11698,11 +11683,8 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1169811683
}
1169911684

1170011685
if (return_value_used == 0) {
11701-
|9:
11702-
return 1;
11703-
}
11704-
11705-
if (opline->op1_type == IS_CONST) {
11686+
/* pass */
11687+
else if (opline->op1_type == IS_CONST) {
1170611688
zval *zv = RT_CONSTANT(opline, opline->op1);
1170711689
| ZVAL_COPY_CONST ret_addr, MAY_BE_ANY, MAY_BE_ANY, zv, ZREG_R0
1170811690
if (Z_REFCOUNTED_P(zv)) {
@@ -11767,6 +11749,20 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1176711749
}
1176811750

1176911751
|9:
11752+
if (ZEND_OBSERVER_ENABLED) {
11753+
if (Z_MODE(op1_addr) == IS_REG) {
11754+
zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11755+
11756+
if (!zend_jit_spill_store(Dst, op1_addr, dst, op1_info, 1)) {
11757+
return 0;
11758+
}
11759+
op1_addr = dst;
11760+
}
11761+
| LOAD_ZVAL_ADDR FCARG2a, op1_addr
11762+
| mov FCARG1a, FP
11763+
| SET_EX_OPLINE opline, r0
11764+
| EXT_CALL zend_observer_fcall_end, r0
11765+
}
1177011766
return 1;
1177111767
}
1177211768

0 commit comments

Comments
(0)

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