Skip to content

Commit 025c076

Browse files
committed
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)
1 parent 2b4acf0 commit 025c076

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
@@ -12034,6 +12034,9 @@ static int zend_jit_fetch_dim(dasm_State **Dst,
1203412034
| CMP_ZVAL_TYPE op1_addr, IS_FALSE
1203512035
| jg >7
1203612036
}
12037+
if (Z_REG(op1_addr) != ZREG_FP) {
12038+
| mov T1, Ra(Z_REG(op1_addr)) // save
12039+
}
1203712040
if ((op1_info & MAY_BE_UNDEF)
1203812041
&& opline->opcode == ZEND_FETCH_DIM_RW) {
1203912042
if (op1_info & (MAY_BE_NULL|MAY_BE_FALSE)) {
@@ -12045,9 +12048,6 @@ static int zend_jit_fetch_dim(dasm_State **Dst,
1204512048
|1:
1204612049
}
1204712050
| // ZVAL_ARR(container, zend_new_array(8));
12048-
if (Z_REG(op1_addr) != ZREG_FP) {
12049-
| mov T1, Ra(Z_REG(op1_addr)) // save
12050-
}
1205112051
| EXT_CALL _zend_new_array_0, r0
1205212052
if (Z_REG(op1_addr) != ZREG_FP) {
1205312053
| mov Ra(Z_REG(op1_addr)), T1 // restore

0 commit comments

Comments
 (0)