mirror of
https://github.com/php/php-src.git
synced 2026-03-30 20:22:36 +02:00
Merge branch 'PHP-8.0'
* PHP-8.0: JIT: Fixed failures of tracing JIT with CALL VM
This commit is contained in:
@@ -2847,6 +2847,11 @@ static int zend_jit_set_ip(dasm_State **Dst, const zend_op *opline)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_set_ip_ex(dasm_State **Dst, const zend_op *opline, bool set_ip_reg)
|
||||
{
|
||||
return zend_jit_set_ip(Dst, opline);
|
||||
}
|
||||
|
||||
static int zend_jit_set_valid_ip(dasm_State **Dst, const zend_op *opline)
|
||||
{
|
||||
if (delayed_call_chain) {
|
||||
|
||||
@@ -6431,11 +6431,11 @@ static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_n
|
||||
|
||||
opline = zend_jit_traces[trace_num].exit_info[exit_num].opline;
|
||||
if (opline) {
|
||||
zend_jit_set_ip(&dasm_state, opline);
|
||||
if (opline == zend_jit_traces[zend_jit_traces[trace_num].root].opline) {
|
||||
/* prevent endless loop */
|
||||
original_handler = 1;
|
||||
}
|
||||
zend_jit_set_ip_ex(&dasm_state, opline, original_handler);
|
||||
}
|
||||
|
||||
zend_jit_trace_return(&dasm_state, original_handler);
|
||||
|
||||
@@ -3058,6 +3058,24 @@ static int zend_jit_set_ip(dasm_State **Dst, const zend_op *opline)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_set_ip_ex(dasm_State **Dst, const zend_op *opline, bool set_ip_reg)
|
||||
{
|
||||
if (last_valid_opline == opline) {
|
||||
zend_jit_use_last_valid_opline();
|
||||
} else if (GCC_GLOBAL_REGS && last_valid_opline) {
|
||||
zend_jit_use_last_valid_opline();
|
||||
| ADD_IP (opline - last_valid_opline) * sizeof(zend_op);
|
||||
} else if (!GCC_GLOBAL_REGS && set_ip_reg) {
|
||||
| LOAD_ADDR RX, opline
|
||||
| mov aword EX->opline, RX
|
||||
} else {
|
||||
| LOAD_IP_ADDR opline
|
||||
}
|
||||
zend_jit_set_last_valid_opline(opline);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_set_valid_ip(dasm_State **Dst, const zend_op *opline)
|
||||
{
|
||||
if (delayed_call_chain) {
|
||||
|
||||
Reference in New Issue
Block a user