Skip to content

Backport GH-17869 to PHP 8.3 JIT #17918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions ext/opcache/jit/zend_jit_arm64.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -8655,11 +8655,18 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con
| str TMP1w, EX:RX->This.u1.type_info
| // Z_PTR(call->This) = object_or_called_scope;
| str REG1, EX:RX->This.value.ptr
| ldr TMP1, [REG0, #offsetof(zend_closure, func.op_array.run_time_cache__ptr)]
| cbnz TMP1, >1
| add FCARG1x, REG0, #offsetof(zend_closure, func)
| EXT_CALL zend_jit_init_func_run_time_cache_helper, REG0
|1:
if (!func) {
| ldrb TMP1w, [REG0, #offsetof(zend_closure, func.type)]
| cmp TMP1w, #ZEND_USER_FUNCTION
| beq >1
}
if (!func || func->common.type == ZEND_USER_FUNCTION) {
| add FCARG1x, REG0, #offsetof(zend_closure, func)
| EXT_CALL zend_jit_init_func_run_time_cache_helper, REG0
}
if (!func) {
|1:
}
}
| // ZEND_CALL_NUM_ARGS(call) = num_args;
| LOAD_32BIT_VAL TMP1w, opline->extended_value
Expand Down
16 changes: 11 additions & 5 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -9255,11 +9255,17 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con
| or dword EX:RX->This.u1.type_info, edx
| // Z_PTR(call->This) = object_or_called_scope;
| mov aword EX:RX->This.value.ptr, r1
| cmp aword [r0 + offsetof(zend_closure, func.op_array.run_time_cache__ptr)], 0
| jnz >1
| lea FCARG1a, aword [r0 + offsetof(zend_closure, func)]
| EXT_CALL zend_jit_init_func_run_time_cache_helper, r0
|1:
if (!func) {
| cmp byte [r0 + offsetof(zend_closure, func.type)], ZEND_USER_FUNCTION
| jnz >1
}
if (!func || func->common.type == ZEND_USER_FUNCTION) {
| lea FCARG1a, aword [r0 + offsetof(zend_closure, func)]
| EXT_CALL zend_jit_init_func_run_time_cache_helper, r0
}
if (!func) {
|1:
}
}
| // ZEND_CALL_NUM_ARGS(call) = num_args;
| mov dword EX:RX->This.u2.num_args, opline->extended_value
Expand Down
Loading