Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  JIT: Fixed exit from CALL VM with GCC Global Register Variables
This commit is contained in:
Dmitry Stogov 2021-09-13 11:40:45 +03:00
commit 971142a12a
3 changed files with 8 additions and 3 deletions

View file

@ -2358,7 +2358,8 @@ static int zend_jit_trace_halt_stub(dasm_State **Dst)
| EXT_JMP zend_jit_halt_op->handler, REG0
} else if (GCC_GLOBAL_REGS) {
| ldp x29, x30, [sp], # SPAD // stack alignment
| ret // PC must be zero
| mov IP, xzr // PC must be zero
| ret
} else {
| ldp FP, RX, T2 // retore FP and IP
| ldp x29, x30, [sp], # NR_SPAD // stack alignment

View file

@ -318,7 +318,10 @@ static zend_always_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_trace_c
if (UNEXPECTED(*(ZEND_OP_TRACE_INFO(opline, offset)->counter) <= 0)) {
*(ZEND_OP_TRACE_INFO(opline, offset)->counter) = ZEND_JIT_COUNTER_INIT;
if (UNEXPECTED(zend_jit_trace_hot_root(execute_data, opline) < 0)) {
#ifndef HAVE_GCC_GLOBAL_REGS
#ifdef HAVE_GCC_GLOBAL_REGS
opline = NULL;
return;
#else
return -1;
#endif
}

View file

@ -2372,7 +2372,8 @@ static int zend_jit_trace_halt_stub(dasm_State **Dst)
| EXT_JMP zend_jit_halt_op->handler, r0
} else if (GCC_GLOBAL_REGS) {
| add r4, SPAD // stack alignment
| ret // PC must be zero
| xor IP, IP // PC must be zero
| ret
} else {
| mov FP, aword T2 // restore FP
| mov RX, aword T3 // restore IP