From: Dmitry Stogov Date: Thu, 23 Jul 2020 09:08:07 +0000 (+0300) Subject: Avoid register reloading X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0c3ca0e52674b0e5d5b1c934e6186ad7dd778d0;p=php Avoid register reloading --- diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 97e1269323..0a5195aeef 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -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)) { @@ -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,