RFR: 8287394: AArch64: Remove cbuf parameter from far_call/far_jump/trampoline_call

Feilong Jiang fjiang at openjdk.org
Thu Sep 15 07:17:47 UTC 2022


On Mon, 12 Sep 2022 18:50:23 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

> `far_call`/`far_jump`/`trampoline_call` have parameter `cbuf` with the default value `NULL`. We always call `far_call`/`far_jump` with `NULL`. We call  `trampoline_call` with either `NULL` or the `CodeBuffer` currently used by `MacroAssembler`. If not `NULL` we mark a trampoline call position.
> 
> Andrew Haley(@theRealAph) in https://github.com/openjdk/jdk/pull/8564#discussion_r871062342 suggests to remove it.
> 
> This PR removes the parameter. In the case of `trampoline_call` we explicitly return the position of the generated trampoline calls. All places using the position of the generated trampoline call are updated.
> 
> Tested with release and fastdebug builds:
> - `gtest`: Passed.
> - `tier1`/`tier2`: Passed.

Hi @eastig, I'm doing the same cleanup on riscv port, and I noticed that you also removed `clear_inst_mark()` in `aarch64_enc_java_static_call` and `aarch64_enc_java_to_runtime`.
Seem it was related to the removing of cbuf in `trampoline_call`, but there is still one `clear_inst_mark()` in `aarch64_enc_java_dynamic_call` [1]. 
So I dig into the `ic_call` and find out that it calls `trampoline_call` at last. If I was understanding correctly, it could be removed too, right?

[1] https://github.com/openjdk/jdk/blob/eeb625e7095e65e64023cbfe05e579af90f4b638/src/hotspot/cpu/aarch64/aarch64.ad#L3661-L3674

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

PR: https://git.openjdk.org/jdk/pull/10244


More information about the hotspot-dev mailing list