From: Dmitry Stogov Date: Mon, 18 May 2020 12:29:28 +0000 (+0300) Subject: Fixed JIT on load with -O4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5899b1611e3b4aced9649cb092a625e7f8f5ca39;p=php Fixed JIT on load with -O4 --- 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 {