com php-src: Avoid register reloading: ext/opcache/jit/zend_j it_x86.dasc
| From: | Dmitry Stogov | Date: | Thu, 23 Jul 2020 09:08:07 +0000 |
| Subject: | com php-src: Avoid register reloading: ext/opcache/jit/zend_j it_x86.dasc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112333@lists.php.net to get a copy of this message | ||
Commit: b0c3ca0e52674b0e5d5b1c934e6186ad7dd778d0
Author: Dmitry Stogov <dmitry@zend.com> Thu, 23 Jul 2020 12:08:07 +0300
Parents: 545928e4b8e8eb7d0f6ae5e4026edfad8757758e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b0c3ca0e52674b0e5d5b1c934e6186ad7dd778d0
Log:
Avoid register reloading
Changed paths:
M ext/opcache/jit/zend_jit_x86.dasc
Diff:
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,