Skip to content

Commit 59622d9

Browse files
committed
Fixed profile based JIT (opcache.jit=1225)
1 parent 2de4a93 commit 59622d9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,9 +2098,16 @@ static int zend_jit_hybrid_profile_jit_stub(dasm_State **Dst)
20982098
| // jit_extension = (const void*)ZEND_FUNC_INFO(op_array);
20992099
| ldr REG0, [REG0, #offsetof(zend_op_array, reserved[zend_func_info_rid])]
21002100
| // ++ZEND_COUNTER_INFO(op_array)
2101-
| SAFE_MEM_ACC_WITH_UOFFSET ldr, TMP2, REG2, (zend_jit_profile_counter_rid * sizeof(void*)), TMP1
2102-
| add TMP2, TMP2, #1
2103-
| str TMP2, [REG2, TMP1]
2101+
|| if ((zend_jit_profile_counter_rid * sizeof(void*)) > LDR_STR_PIMM64) {
2102+
| LOAD_32BIT_VAL TMP1, (zend_jit_profile_counter_rid * sizeof(void*))
2103+
| ldr TMP2, [REG2, TMP1]
2104+
| add TMP2, TMP2, #1
2105+
| str TMP2, [REG2, TMP1]
2106+
|| } else {
2107+
| ldr TMP2, [REG2, #(zend_jit_profile_counter_rid * sizeof(void*))]
2108+
| add TMP2, TMP2, #1
2109+
| str TMP2, [REG2, #(zend_jit_profile_counter_rid * sizeof(void*))]
2110+
|| }
21042111
| // return ((zend_vm_opcode_handler_t)jit_extension->orig_handler)()
21052112
| ldr TMP1, [REG0, #offsetof(zend_jit_op_array_extension, orig_handler)]
21062113
| br TMP1

0 commit comments

Comments
 (0)