Skip to content

Commit d8a1e3d

Browse files
committed
Fix JIT as well
1 parent ec0ce49 commit d8a1e3d

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7957,6 +7957,10 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op *opline, const ze
79577957

79587958
|=>jit_return_label:
79597959

7960+
| // EG(current_execute_data) = EX(prev_execute_data);
7961+
| mov r0, EX->prev_execute_data
7962+
| MEM_OP2_1_ZTS mov, aword, executor_globals, current_execute_data, r0, r2
7963+
79607964
// i_free_compiled_variables(execute_data);
79617965
if (!zend_jit_free_compiled_variables(Dst, opline, op_array, ssa)) {
79627966
return 0;
@@ -7969,9 +7973,6 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op *opline, const ze
79697973

79707974
if ((op_array->scope && !(op_array->fn_flags & ZEND_ACC_STATIC)) ||
79717975
(op_array->fn_flags & ZEND_ACC_CLOSURE)) {
7972-
| // EG(current_execute_data) = EX(prev_execute_data);
7973-
| mov r0, EX->prev_execute_data
7974-
| MEM_OP2_1_ZTS mov, aword, executor_globals, current_execute_data, r0, r2
79757976
if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
79767977
| // OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
79777978
| mov r0, EX->func
@@ -7987,18 +7988,11 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op *opline, const ze
79877988
| OBJ_RELEASE r0, ecx, >4
79887989
}
79897990
|4:
7990-
| // EG(vm_stack_top) = (zval*)execute_data;
7991-
| MEM_OP2_1_ZTS mov, aword, executor_globals, vm_stack_top, FP, r0
7992-
| // execute_data = EX(prev_execute_data);
7993-
| mov FP, EX->prev_execute_data
7994-
} else {
7995-
| // EG(vm_stack_top) = (zval*)execute_data;
7996-
| MEM_OP2_1_ZTS mov, aword, executor_globals, vm_stack_top, FP, r0
7997-
| // execute_data = EX(prev_execute_data);
7998-
| mov FP, EX->prev_execute_data
7999-
| // EG(current_execute_data) = execute_data
8000-
| MEM_OP2_1_ZTS mov, aword, executor_globals, current_execute_data, FP, r0
80017991
}
7992+
| // EG(vm_stack_top) = (zval*)execute_data;
7993+
| MEM_OP2_1_ZTS mov, aword, executor_globals, vm_stack_top, FP, r0
7994+
| // execute_data = EX(prev_execute_data);
7995+
| mov FP, EX->prev_execute_data
80027996
| // if (EG(exception))
80037997
| MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r0
80047998
| LOAD_OPLINE

0 commit comments

Comments
 (0)