[php-src] jit-arm64: Get rid of NYI in call/return sequences

From: Date: Thu, 22 Apr 2021 23:54:29 +0000
Subject: [php-src] jit-arm64: Get rid of NYI in call/return sequences
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-115773@lists.php.net to get a copy of this message
Author: Dmitry Stogov (dstogov) Date: 2021-04-23T02:52:01+03:00 Commit: https://github.com/php/php-src/commit/30817ff33edb8199fbfb7ec7a6334e92cb94bdd4 Raw diff: https://github.com/php/php-src/commit/30817ff33edb8199fbfb7ec7a6334e92cb94bdd4.diff Get rid of NYI in call/return sequences Changed paths: M ext/opcache/jit/zend_jit_arm64.dasc Diff: diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index 948739d84e14..b6a9060c9d22 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -7664,7 +7664,6 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con | tst TMP1w, #1 | bne >1 } else { - | NIY // TODO: test | LOAD_32BIT_VAL FCARG1w, used_stack } | // used_stack += (func->op_array.last_var + func->op_array.T - MIN(func->op_array.num_args, num_args)) * sizeof(zval); @@ -7678,7 +7677,13 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con | ldr TMP1w, [REG0, #offsetof(zend_function, op_array.T)] | sub REG2w, REG2w, TMP1w } else { - | NIY // TODO + | ldr TMP1w, [REG0, #offsetof(zend_closure, func.op_array.num_args)] + | cmp REG2w, TMP1w + | csel REG2w, REG2w, TMP1w, le + | ldr TMP1w, [REG0, #offsetof(zend_closure, func.op_array.last_var)] + | sub REG2w, REG2w, TMP1w + | ldr TMP1w, [REG0, #offsetof(zend_closure, func.op_array.T)] + | sub REG2w, REG2w, TMP1w } | lsl REG2w, REG2w, #5 | sxtw REG2, REG2w @@ -7717,7 +7722,6 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con | blt >1 |.cold_code |1: - | NIY // TODO: test. Cold. | EXT_JMP exit_addr, TMP1 |.code } else { @@ -7773,13 +7777,15 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con && op_array == &func->op_array && (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE) && (sizeof(void*) != 8 || IS_SIGNED_32BIT(func))) { - | NIY // TODO + | LOAD_ADDR TMP1, func + | str TMP1, EX:RX->func } else { | str REG0, EX:RX->func } } else { | // call->func = &closure->func; - | NIY // TODO + | add REG1, REG0, #offsetof(zend_closure, func) + | str REG1, EX:RX->func } |1: } @@ -7790,9 +7796,13 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con if (opline->op1_type == IS_UNUSED || use_this) { | // call->call_info |= ZEND_CALL_HAS_THIS; if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE) { - | NIY // TODO + | LOAD_32BIT_VAL TMP1w, ZEND_CALL_HAS_THIS + | str TMP1w, EX:RX->This.u1.type_info } else { - | NIY // TODO + | LOAD_32BIT_VAL TMP1w, ZEND_CALL_HAS_THIS + | ldr TMP2w, EX:RX->This.u1.type_info + | orr TMP2w, TMP2w, TMP1w + | str TMP2w, EX:RX->This.u1.type_info } } else { if (opline->op1_type == IS_CV) { @@ -7801,7 +7811,8 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con } | // call->call_info |= ZEND_CALL_HAS_THIS | ZEND_CALL_RELEASE_THIS; if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE) { - | NIY // TODO + | LOAD_32BIT_VAL TMP1w, (ZEND_CALL_HAS_THIS | ZEND_CALL_RELEASE_THIS) + | str TMP1w, EX:RX->This.u1.type_info } else { | ldr TMP1w, EX:RX->This.u1.type_info | LOAD_32BIT_VAL TMP2w, (ZEND_CALL_HAS_THIS | ZEND_CALL_RELEASE_THIS) @@ -8019,7 +8030,9 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t zend_function *func = NULL; if (delayed_call_chain) { - | NIY // TODO + if (!zend_jit_save_call_chain(Dst, delayed_call_level)) { + return 0; + } } if (info) { @@ -9990,7 +10003,6 @@ static int zend_jit_leave_func(dasm_State **Dst, | ldr FP, EX->prev_execute_data if (!left_frame) { - | NIY // TODO: teset | // EG(current_execute_data) = execute_data; | MEM_STORE_ZTS str, FP, executor_globals, current_execute_data, REG0 }

« previous php.cvs (#115773) next »