Skip to content

Commit

Permalink
Avoid register reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jul 23, 2020
1 parent 545928e commit b0c3ca0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -7967,6 +7967,9 @@ static int zend_jit_qm_assign(dasm_State **Dst, const zend_op *opline, const zen
if (!zend_jit_update_regs(Dst, op1_addr, op1_def_addr, op1_info)) {
return 0;
}
if (Z_MODE(op1_def_addr) == IS_REG && Z_MODE(op1_addr) != IS_REG) {
op1_addr = op1_def_addr;
}
}

if (!zend_jit_simple_assign(Dst, opline, op_array, res_addr, -1, -1, opline->op1_type, opline->op1, op1_addr, op1_info, 0, 0, 0)) {
Expand All @@ -7986,6 +7989,9 @@ static int zend_jit_assign(dasm_State **Dst, const zend_op *opline, const zend_o
if (!zend_jit_update_regs(Dst, op2_addr, op2_def_addr, op2_info)) {
return 0;
}
if (Z_MODE(op2_def_addr) == IS_REG && Z_MODE(op2_addr) != IS_REG) {
op2_addr = op2_def_addr;
}
}

if (!zend_jit_assign_to_variable(Dst, opline, op_array, op1_addr, op1_info, op1_def_info, opline->op2_type, opline->op2, op2_addr, op2_info, res_addr,
Expand Down

0 comments on commit b0c3ca0

Please sign in to comment.