From 5899b1611e3b4aced9649cb092a625e7f8f5ca39 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 18 May 2020 15:29:28 +0300 Subject: [PATCH] Fixed JIT on load with -O4 --- ext/opcache/jit/zend_jit_x86.dasc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 50a5d4298a..97b926085d 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -8327,6 +8327,13 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (func) { if (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE) { | MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1 + } else if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_SCRIPT + && JIT_G(trigger) == ZEND_JIT_ON_SCRIPT_LOAD) { + /* the called op_array may be not persisted yet */ + | test r2, 1 + | jz >1 + | MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1 + |1: } | mov r2, aword [r2] } else { -- 2.50.1