Skip to content

Commit

Permalink
JIT: keep register value across call
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 17, 2021
1 parent 04209de commit 015cafa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -6030,9 +6030,16 @@ static int zend_jit_assign_to_variable_call(dasm_State **Dst,
| IF_ZVAL_TYPE val_addr, IS_UNDEF, >1
|.cold_code
|1:
ZEND_ASSERT(Z_REG(val_addr) == ZREG_FP);
if (Z_REG(var_addr) != ZREG_FP) {
| mov aword T1, Ra(Z_REG(var_addr)) // save
}
| SET_EX_OPLINE opline, r0
| mov FCARG1d, Z_OFFSET(val_addr)
| EXT_CALL zend_jit_undefined_op_helper, r0
if (Z_REG(var_addr) != ZREG_FP) {
| mov Ra(Z_REG(var_addr)), aword T1 // restore
}
| jmp >1
|.code
|1:
Expand Down

0 comments on commit 015cafa

Please sign in to comment.