RFR: 8286056: AArch64: clarify uses of MacroAssembler::far_call/MacroAssembler::far_jump [v2]
Evgeny Astigeevich
duke at openjdk.java.net
Wed May 4 18:27:14 UTC 2022
On Wed, 4 May 2022 17:04:39 GMT, Evgeny Astigeevich <duke at openjdk.java.net> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 1105:
>>
>>> 1103: // - relocInfo::none
>>> 1104: // If the distance to the address can exceed the branch range (128M for the release build)
>>> 1105: // for direct calls/jumps, an indirect call/jump is generated.
>>
>> What is `indirect` in this case? Is it the use of `adrp` or it is `trampoline` (which is also kind of `indirect`)?
>> What is used in `debug` build (since you mentioned `release` build)?
>> Would be nice if you also add similar extended description for `trampoline_call()`.
>
>> Would be nice if you also add similar extended description for trampoline_call().
>
> Yes, I'll do: https://bugs.openjdk.java.net/browse/JDK-8286058
>
>> What is indirect in this case? Is it the use of adrp or it is trampoline (which is also kind of indirect)?
>
> It is a call/branch at an address in a register. Yes, a trampoline is an indirect far call. I'll update the comment.
> Trampolines use `ldr` instead of `adrp` which allows jumping anywhere in the memory. `adrp` in limited to 4Gb. As trampolines are always used for calling code inside `CodeCache` and `CodeCache` is limited to 2Gb, using `ldr` might be expensive in such cases. Created https://bugs.openjdk.java.net/browse/JDK-8286140.
>
>> What is used in debug build (since you mentioned release build)?
>
> 2M. 128M is ISA limit.
Vladimir, I have updated the description according to your comments.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8534
More information about the hotspot-dev
mailing list