From 2e02b1f1577e5f3bdfbbaecd5e94d80c08c8deaa Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 27 Sep 2021 23:16:47 +0300 Subject: [PATCH] JIT: Call zend_hash_index_find() instead of _zend_hash_index_find() if we didn't check for packed array before --- ext/opcache/jit/zend_jit_x86.dasc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index fda6e9eee77..23231160394 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -5466,7 +5466,11 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o | // hval = Z_LVAL_P(dim); | GET_ZVAL_LVAL ZREG_FCARG2a, op2_addr } - | EXT_CALL _zend_hash_index_find, r0 + if (packed_loaded) { + | EXT_CALL _zend_hash_index_find, r0 + } else { + | EXT_CALL zend_hash_index_find, r0 + } | test r0, r0 if (not_found_exit_addr) { | jz ¬_found_exit_addr @@ -5522,7 +5526,11 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o | // hval = Z_LVAL_P(dim); | GET_ZVAL_LVAL ZREG_FCARG2a, op2_addr } - | EXT_CALL _zend_hash_index_find, r0 + if (packed_loaded) { + | EXT_CALL _zend_hash_index_find, r0 + } else { + | EXT_CALL zend_hash_index_find, r0 + } | test r0, r0 if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) { | jz &exit_addr