]> granicus.if.org Git - php/commitdiff
Fixed register allocation
authorDmitry Stogov <dmitry@zend.com>
Wed, 27 Nov 2019 13:26:43 +0000 (16:26 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 27 Nov 2019 13:26:43 +0000 (16:26 +0300)
ext/opcache/jit/zend_jit_x86.dasc

index 860b88291704a746f29b4418b8da181d762e855d..b319b29f187cfd9cb1d7a36eb933c1fc132192b8 100644 (file)
@@ -6835,6 +6835,14 @@ static int zend_jit_assign(dasm_State **Dst, const zend_op *opline, const zend_o
        if (!zend_jit_assign_to_variable(Dst, opline, op_array, ssa, op1_addr, op1_info, op1_def_info, opline->op2_type, opline->op2, op2_addr, op2_info, res_addr)) {
                return 0;
        }
+       if (ra && !zend_jit_store_ssa_var_if_necessary(Dst, ssa, ra, op1_addr, ssa->ops[opline - op_array->opcodes].op1_def, ssa->ops[opline - op_array->opcodes].op1_use)) {
+               return 0;
+       }
+       if (opline->result_type != IS_UNUSED) {
+               if (ra && !zend_jit_store_ssa_var_if_necessary(Dst, ssa, ra, res_addr, ssa->ops[opline - op_array->opcodes].result_def, ssa->ops[opline - op_array->opcodes].result_use)) {
+                       return 0;
+               }
+       }
 
        if (zend_may_throw(opline, op_array, ssa)) {
                zend_jit_check_exception(Dst);