Skip to content

Commit b0c3ca0

Browse files
committed
Avoid register reloading
1 parent 545928e commit b0c3ca0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7967,6 +7967,9 @@ static int zend_jit_qm_assign(dasm_State **Dst, const zend_op *opline, const zen
79677967
if (!zend_jit_update_regs(Dst, op1_addr, op1_def_addr, op1_info)) {
79687968
return 0;
79697969
}
7970+
if (Z_MODE(op1_def_addr) == IS_REG && Z_MODE(op1_addr) != IS_REG) {
7971+
op1_addr = op1_def_addr;
7972+
}
79707973
}
79717974

79727975
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
79867989
if (!zend_jit_update_regs(Dst, op2_addr, op2_def_addr, op2_info)) {
79877990
return 0;
79887991
}
7992+
if (Z_MODE(op2_def_addr) == IS_REG && Z_MODE(op2_addr) != IS_REG) {
7993+
op2_addr = op2_def_addr;
7994+
}
79897995
}
79907996

79917997
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,

0 commit comments

Comments
 (0)