diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-05 20:51:31 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-05 20:52:30 +0200 |
commit | da8b583ac13aab669e7a86215530bdcdce9ef453 (patch) | |
tree | b52b984c5650316b5708b1b74be45059f2ef37b9 | |
parent | 705f8abcb7db883b13f8fbf64da2396f4644827f (diff) | |
download | php-git-da8b583ac13aab669e7a86215530bdcdce9ef453.tar.gz |
Always generate interrupt check in jit
Even if zend_interrupt_function is NULL, we still need to perform
the interrupt check for timeouts (which do not use
zend_interrupt_function).
-rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 8e2c0f529b..4c896b581f 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2680,28 +2680,25 @@ static int zend_jit_set_valid_ip(dasm_State **Dst, const zend_op *opline) static int zend_jit_check_timeout(dasm_State **Dst, const zend_op *opline) { - if (zend_interrupt_function) { #if 0 - if (!zend_jit_set_valid_ip(Dst, opline)) { - return 0; - } - | MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0 - | jne ->interrupt_handler + if (!zend_jit_set_valid_ip(Dst, opline)) { + return 0; + } + | MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0 + | jne ->interrupt_handler #else - | MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0 - if (last_valid_opline == opline) { - | jne ->interrupt_handler - } else { - | jne >1 - |.cold_code - |1: - | LOAD_IP_ADDR opline - | jmp ->interrupt_handler - |.code - } - return 1; -#endif + | MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0 + if (last_valid_opline == opline) { + | jne ->interrupt_handler + } else { + | jne >1 + |.cold_code + |1: + | LOAD_IP_ADDR opline + | jmp ->interrupt_handler + |.code } +#endif return 1; } |