diff options
author | Dmitry Stogov <dmitry@zend.com> | 2020-05-27 10:57:33 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2020-05-27 10:57:33 +0300 |
commit | f91283fcd42b21063f9bcceecb930f18dbd29a88 (patch) | |
tree | 37ab7f45b676e3f6fd5bc88a6170c037f3a30b90 | |
parent | 0bff4e56e29d4f6bfb00b523079a7ceef3bb1df4 (diff) | |
download | php-git-f91283fcd42b21063f9bcceecb930f18dbd29a88.tar.gz |
Fixed JIT for ext/opcache/tests/bool_not_cv.phpt with opcache.jit=1202
-rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index e7b17b0b8e..abee45b95c 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -7224,6 +7224,7 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, const z uint32_t false_label = -1; zend_bool set_bool = 0; zend_bool set_bool_not = 0; + zend_bool set_delayed = 0; zend_bool jmp_done = 0; if (branch_opcode == ZEND_BOOL) { @@ -7393,7 +7394,11 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, const z } else { | add eax, 2 } - | SET_ZVAL_TYPE_INFO res_addr, eax + if ((op1_info & MAY_BE_UNDEF) && (op1_info & MAY_BE_ANY)) { + set_delayed = 1; + } else { + | SET_ZVAL_TYPE_INFO res_addr, eax + } } } } @@ -7401,7 +7406,13 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, const z /* It's FALSE, but may be UNDEF */ if (op1_info & MAY_BE_UNDEF) { if (op1_info & MAY_BE_ANY) { - | IF_ZVAL_TYPE op1_addr, IS_UNDEF, >1 + if (set_delayed) { + | CMP_ZVAL_TYPE op1_addr, IS_UNDEF + | SET_ZVAL_TYPE_INFO res_addr, eax + | jz >1 + } else { + | IF_ZVAL_TYPE op1_addr, IS_UNDEF, >1 + } |.cold_code |1: } |