Skip to content

Commit 608d568

Browse files
committed
JIT: Avoid reloading of EX(run_time_cache)
1 parent 3565d02 commit 608d568

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11443,8 +11443,8 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_
1144311443
zend_string *varname = Z_STR_P(RT_CONSTANT(opline, opline->op2));
1144411444

1144511445
| // idx = (uint32_t)(uintptr_t)CACHED_PTR(opline->extended_value) - 1;
11446-
| ldr REG0, EX->run_time_cache
11447-
| MEM_ACCESS_64_WITH_UOFFSET ldr, REG0, REG0, opline->extended_value, TMP1
11446+
| ldr FCARG2x, EX->run_time_cache
11447+
| MEM_ACCESS_64_WITH_UOFFSET ldr, REG0, FCARG2x, opline->extended_value, TMP1
1144811448
| sub REG0, REG0, #1
1144911449
| // if (EXPECTED(idx < EG(symbol_table).nNumUsed * sizeof(Bucket)))
1145011450
| MEM_LOAD_32_ZTS ldr, REG1w, executor_globals, symbol_table.nNumUsed, REG1
@@ -11506,7 +11506,6 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_
1150611506
|.cold_code
1150711507
|9:
1150811508
| LOAD_ADDR FCARG1x, (ptrdiff_t)varname
11509-
| ldr FCARG2x, EX->run_time_cache
1151011509
if (opline->extended_value) {
1151111510
| ADD_SUB_64_WITH_CONST_32 add, FCARG2x, FCARG2x, opline->extended_value, TMP1
1151211511
}

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12107,8 +12107,8 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_
1210712107
zend_string *varname = Z_STR_P(RT_CONSTANT(opline, opline->op2));
1210812108

1210912109
| // idx = (uint32_t)(uintptr_t)CACHED_PTR(opline->extended_value) - 1;
12110-
| mov r0, EX->run_time_cache
12111-
| mov r0, aword [r0 + opline->extended_value]
12110+
| mov FCARG2a, EX->run_time_cache
12111+
| mov r0, aword [FCARG2a + opline->extended_value]
1211212112
| sub r0, 1
1211312113
| // if (EXPECTED(idx < EG(symbol_table).nNumUsed * sizeof(Bucket)))
1211412114
| MEM_LOAD_ZTS ecx, dword, executor_globals, symbol_table.nNumUsed, r1
@@ -12172,7 +12172,6 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_
1217212172
|.cold_code
1217312173
|9:
1217412174
| LOAD_ADDR FCARG1a, (ptrdiff_t)varname
12175-
| mov FCARG2a, EX->run_time_cache
1217612175
if (opline->extended_value) {
1217712176
| add FCARG2a, opline->extended_value
1217812177
}

0 commit comments

Comments
 (0)