Skip to content

Commit c53e8d3

Browse files
committed
Handle zend_execute_internal in JIT
1 parent 3175f24 commit c53e8d3

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

+9-5
Original file line numberDiff line numberDiff line change
@@ -9705,13 +9705,17 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
97059705

97069706
zend_jit_reset_last_valid_opline();
97079707

9708-
| // fbc->internal_function.handler(call, ret);
9708+
| // (zend_execute_internal ? zend_execute_internal : fbc->internal_function.handler)(call, ret);
97099709
| mov FCARG1x, RX
9710-
if (func) {
9711-
| EXT_CALL func->internal_function.handler, REG0
9710+
if (zend_execute_internal) {
9711+
| EXT_CALL zend_execute_internal, REG0
97129712
} else {
9713-
| ldr TMP1, [REG0, #offsetof(zend_internal_function, handler)]
9714-
| blr TMP1
9713+
if (func) {
9714+
| EXT_CALL func->internal_function.handler, REG0
9715+
} else {
9716+
| ldr TMP1, [REG0, #offsetof(zend_internal_function, handler)]
9717+
| blr TMP1
9718+
}
97159719
}
97169720

97179721
| // EG(current_execute_data) = execute_data;

ext/opcache/jit/zend_jit_x86.dasc

+8-4
Original file line numberDiff line numberDiff line change
@@ -10394,12 +10394,16 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
1039410394

1039510395
zend_jit_reset_last_valid_opline();
1039610396

10397-
| // fbc->internal_function.handler(call, ret);
10397+
| // (zend_execute_internal ? zend_execute_internal : fbc->internal_function.handler)(call, ret);
1039810398
| mov FCARG1a, RX
10399-
if (func) {
10400-
| EXT_CALL func->internal_function.handler, r0
10399+
if (zend_execute_internal) {
10400+
| EXT_CALL zend_execute_internal, r0
1040110401
} else {
10402-
| call aword [r0 + offsetof(zend_internal_function, handler)]
10402+
if (func) {
10403+
| EXT_CALL func->internal_function.handler, r0
10404+
} else {
10405+
| call aword [r0 + offsetof(zend_internal_function, handler)]
10406+
}
1040310407
}
1040410408

1040510409
| // EG(current_execute_data) = execute_data;

0 commit comments

Comments
 (0)