1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 18:43:37 +02:00

Merge branch 'PHP-8.0'

* PHP-8.0:
  Observe unused return values in JIT
This commit is contained in:
Nikita Popov
2021-01-19 10:10:08 +01:00

View File

@@ -11412,6 +11412,13 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
return_value_used = -1;
}
if (ZEND_OBSERVER_ENABLED) {
| LOAD_ZVAL_ADDR FCARG2a, op1_addr
| mov FCARG1a, FP
| SET_EX_OPLINE opline, r0
| EXT_CALL zend_observer_fcall_end, r0
}
// if (!EX(return_value))
if (Z_MODE(op1_addr) == IS_REG && Z_REG(op1_addr) == ZREG_R1) {
if (return_value_used != 0) {
@@ -11478,12 +11485,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
if (return_value_used == 0) {
|9:
if (ZEND_OBSERVER_ENABLED) {
| xor FCARG2a, FCARG2a
| mov FCARG1a, FP
| SET_EX_OPLINE opline, r0
| EXT_CALL zend_observer_fcall_end, r0
}
return 1;
}
@@ -11552,12 +11553,6 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o
}
|9:
if (ZEND_OBSERVER_ENABLED) {
| LOAD_ZVAL_ADDR FCARG2a, ret_addr
| mov FCARG1a, FP
| SET_EX_OPLINE opline, r0
| EXT_CALL zend_observer_fcall_end, r0
}
return 1;
}