RFR: 8286058: AArch64: clarify types of calls [v3]

Andrew Haley aph at openjdk.java.net
Wed May 25 07:38:46 UTC 2022


On Thu, 19 May 2022 16:46:32 GMT, Evgeny Astigeevich <duke at openjdk.java.net> wrote:

>> The PR clarifies the types of calls AArch64 OpenJDK uses. It cleans up far_call, far_jump and trampoline_call. It removes trampoline_call1 because its use cases are now supported by trampoline_call.
>> Tested a fastdebug build:
>> - `gtest`: Passed
>> - `tier1`...`tier3`: Passed
>
> Evgeny Astigeevich has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
> 
>  - Describe call types; Fix API
>  - Merge branch 'master' into JDK-8286058
>  - Merge branch 'master' into JDK-8286058
>  - Fix assert message
>  - 8286058: AArch64: clarify uses of MacroAssembler::trampoline_call

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 1144:

> 1142:   //
> 1143:   //     A link-time optimization can be applied to a trampoline call when the generated
> 1144:   //     code is moved to the code cache. A trampoline call is replaced with by a direct call.

Suggestion:

  //     If the destination is in range when the generated code is moved to the code cache,
  //     'bl trampoline' is replaced with `bl destination` and the trampoline is not used.

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 1145:

> 1143:   //     A link-time optimization can be applied to a trampoline call when the generated
> 1144:   //     code is moved to the code cache. A trampoline call is replaced with by a direct call.
> 1145:   //     The optimization does not remove the trampoline from the stub section.

Suggestion:

  //     The optimization does not remove the trampoline from the stub section.
  //     This is necessary because the trampoline may well be redirected later when
  //     code is patched, and the new destination may not be reachable by a simple BR
  //     instruction.

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 1149:

> 1147:   //   - indirect call: move reg, address; blr reg
> 1148:   //     This too can reach anywhere in the address space, but it cannot be
> 1149:   //     patch while code is running, so it must be used at a safepoint.

Suggestion:

  //     patched while code is running, so it must be used at a safepoint.
  //     This form of call is most suitable for targets at fixed addresses, whick
  //     will never be patched.

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 1171:

> 1169:   }
> 1170: 
> 1171:   // Emit a direct call/jump if the entry address is always in range,

Suggestion:

  // Emit a direct call/jump if the entry address will always in be range,

-------------

PR: https://git.openjdk.java.net/jdk/pull/8564


More information about the hotspot-dev mailing list