diff options
author | Dmitry Stogov <dmitry@zend.com> | 2020-06-04 13:19:42 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2020-06-04 13:19:42 +0300 |
commit | 8047c1d05cbb5681e00b10482ddb276155de7903 (patch) | |
tree | 64bd79739207f87d363a3a341c96dc7c5add0ce5 | |
parent | 864fb0ec23d4737e3090b6f77d57057813d8c6b4 (diff) | |
download | php-git-8047c1d05cbb5681e00b10482ddb276155de7903.tar.gz |
Prefer shorter x86 instructions
-rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index f7302d5e16..393c33d5dd 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1156,6 +1156,11 @@ static void* dasm_labels[zend_lb_MAX]; || } |.endmacro +|.macro IF_UNDEF, type_reg, label +| test type_reg, type_reg +| je label +|.endmacro + |.macro IF_TYPE, type, val, label | cmp type, val | je label @@ -1204,7 +1209,9 @@ static void* dasm_labels[zend_lb_MAX]; |.endmacro |.macro IF_NOT_REFCOUNTED, type_flags, label -| IF_NOT_FLAGS type_flags, IS_TYPE_REFCOUNTED, label +| //IF_NOT_FLAGS type_flags, IS_TYPE_REFCOUNTED, label +| test type_flags, type_flags +| jz label |.endmacro |.macro IF_ZVAL_FLAGS, addr, mask, label @@ -10767,7 +10774,7 @@ static int zend_jit_fetch_obj_read(dasm_State **Dst, const zend_op *opline, cons | jl >8 // dynamic property } | mov edx, dword [FCARG1a + r0 + 8] - | IF_TYPE dl, IS_UNDEF, >5 + | IF_UNDEF dl, >5 | add FCARG1a, r0 prop_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, 0); } else { @@ -10780,9 +10787,9 @@ static int zend_jit_fetch_obj_read(dasm_State **Dst, const zend_op *opline, cons if (!exit_addr) { return 0; } - | IF_TYPE dl, IS_UNDEF, &exit_addr + | IF_UNDEF dl, &exit_addr } else { - | IF_TYPE dl, IS_UNDEF, >5 + | IF_UNDEF dl, >5 } } | GET_ZVAL_PTR r0, prop_addr |