mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
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).
This commit is contained in:
parent
705f8abcb7
commit
da8b583ac1
@ -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
|
||||
#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
|
||||
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
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user