Skip to content

Commit e9d1718

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix register save/restore around calls. (This fixes ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202 without PROFITABILITY_CHECKS)
2 parents b624473 + 025c076 commit e9d1718

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12139,6 +12139,9 @@ static int zend_jit_fetch_dim(dasm_State **Dst,
1213912139
| CMP_ZVAL_TYPE op1_addr, IS_FALSE
1214012140
| jg >7
1214112141
}
12142+
if (Z_REG(op1_addr) != ZREG_FP) {
12143+
| mov T1, Ra(Z_REG(op1_addr)) // save
12144+
}
1214212145
if ((op1_info & MAY_BE_UNDEF)
1214312146
&& opline->opcode == ZEND_FETCH_DIM_RW) {
1214412147
if (op1_info & (MAY_BE_NULL|MAY_BE_FALSE)) {
@@ -12150,9 +12153,6 @@ static int zend_jit_fetch_dim(dasm_State **Dst,
1215012153
|1:
1215112154
}
1215212155
| // ZVAL_ARR(container, zend_new_array(8));
12153-
if (Z_REG(op1_addr) != ZREG_FP) {
12154-
| mov T1, Ra(Z_REG(op1_addr)) // save
12155-
}
1215612156
| EXT_CALL _zend_new_array_0, r0
1215712157
if (Z_REG(op1_addr) != ZREG_FP) {
1215812158
| mov Ra(Z_REG(op1_addr)), T1 // restore

0 commit comments

Comments
 (0)