1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00

JIT: Avoid reloading of EX(run_time_cache)

This commit is contained in:
Dmitry Stogov
2021-08-30 13:19:04 +03:00
parent 3565d02c6d
commit 608d568686
2 changed files with 4 additions and 6 deletions

View File

@@ -11443,8 +11443,8 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_
zend_string *varname = Z_STR_P(RT_CONSTANT(opline, opline->op2));
| // idx = (uint32_t)(uintptr_t)CACHED_PTR(opline->extended_value) - 1;
| ldr REG0, EX->run_time_cache
| MEM_ACCESS_64_WITH_UOFFSET ldr, REG0, REG0, opline->extended_value, TMP1
| ldr FCARG2x, EX->run_time_cache
| MEM_ACCESS_64_WITH_UOFFSET ldr, REG0, FCARG2x, opline->extended_value, TMP1
| sub REG0, REG0, #1
| // if (EXPECTED(idx < EG(symbol_table).nNumUsed * sizeof(Bucket)))
| 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_
|.cold_code
|9:
| LOAD_ADDR FCARG1x, (ptrdiff_t)varname
| ldr FCARG2x, EX->run_time_cache
if (opline->extended_value) {
| ADD_SUB_64_WITH_CONST_32 add, FCARG2x, FCARG2x, opline->extended_value, TMP1
}

View File

@@ -12107,8 +12107,8 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_
zend_string *varname = Z_STR_P(RT_CONSTANT(opline, opline->op2));
| // idx = (uint32_t)(uintptr_t)CACHED_PTR(opline->extended_value) - 1;
| mov r0, EX->run_time_cache
| mov r0, aword [r0 + opline->extended_value]
| mov FCARG2a, EX->run_time_cache
| mov r0, aword [FCARG2a + opline->extended_value]
| sub r0, 1
| // if (EXPECTED(idx < EG(symbol_table).nNumUsed * sizeof(Bucket)))
| 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_
|.cold_code
|9:
| LOAD_ADDR FCARG1a, (ptrdiff_t)varname
| mov FCARG2a, EX->run_time_cache
if (opline->extended_value) {
| add FCARG2a, opline->extended_value
}