Skip to content

Commit 29cf598

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Observe unused return values in JIT
2 parents 64a4128 + fbd8e20 commit 29cf598

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11412,6 +11412,13 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1141211412
return_value_used = -1;
1141311413
}
1141411414

11415+
if (ZEND_OBSERVER_ENABLED) {
11416+
| LOAD_ZVAL_ADDR FCARG2a, op1_addr
11417+
| mov FCARG1a, FP
11418+
| SET_EX_OPLINE opline, r0
11419+
| EXT_CALL zend_observer_fcall_end, r0
11420+
}
11421+
1141511422
// if (!EX(return_value))
1141611423
if (Z_MODE(op1_addr) == IS_REG && Z_REG(op1_addr) == ZREG_R1) {
1141711424
if (return_value_used != 0) {
@@ -11478,12 +11485,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1147811485

1147911486
if (return_value_used == 0) {
1148011487
|9:
11481-
if (ZEND_OBSERVER_ENABLED) {
11482-
| xor FCARG2a, FCARG2a
11483-
| mov FCARG1a, FP
11484-
| SET_EX_OPLINE opline, r0
11485-
| EXT_CALL zend_observer_fcall_end, r0
11486-
}
1148711488
return 1;
1148811489
}
1148911490

@@ -11552,12 +11553,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
1155211553
}
1155311554

1155411555
|9:
11555-
if (ZEND_OBSERVER_ENABLED) {
11556-
| LOAD_ZVAL_ADDR FCARG2a, ret_addr
11557-
| mov FCARG1a, FP
11558-
| SET_EX_OPLINE opline, r0
11559-
| EXT_CALL zend_observer_fcall_end, r0
11560-
}
1156111556
return 1;
1156211557
}
1156311558

0 commit comments

Comments
 (0)