RFR: 8358329: AArch64: emit direct branches in static stubs for small code caches [v2]
Mikhail Ablakatov
mablakatov at openjdk.org
Wed Jun 11 15:37:49 UTC 2025
On Tue, 10 Jun 2025 10:37:00 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Mikhail Ablakatov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> address review comments: use pd_patch_instruction directly
>>
>> MacroAssembler::pd_patch_instruction can distinguish between the `b`
>> and `movk movz movz br` sequences. Strictly speaking, the method
>> patches not a single instruction but a semantically joint sequence of
>> instructions. Use it directly instead of `NativeJump` and
>> `NativeGeneralJump` wrapper classes to simplify the implementation and
>> get rid of an extra icache invalidation.
>>
>> Other changes in the patch simply clean up code that became redundant.
>
> src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp line 106:
>
>> 104: } else {
>> 105: NativeJump::insert(method_holder->next_instruction_address(), entry);
>> 106: }
>
> We're also calling `ICache::invalidate_range` twice, which is kinda lame. That perhaps doesn't matter because calls to `CompiledDirectCall::set_to_interpreted()` are fairly rare.
Agreed, thank you for spotting that. Should not be the case any longer.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25702#discussion_r2140504282
More information about the hotspot-dev
mailing list