RFR: 8286058: AArch64: clarify uses of MacroAssembler::trampoline_call [v2]
Andrew Haley
aph at openjdk.java.net
Thu May 12 08:49:52 UTC 2022
On Fri, 6 May 2022 10:06:51 GMT, Evgeny Astigeevich <duke at openjdk.java.net> wrote:
> Could you please be more neutral in your words?
I apologize for my use of words. It was an inappropriate thing to say, and I wish I hadn't said it.
If you would like to continue, perhaps we could work on this together, and come up with something we both like. Would you be happy to try that?
I think it could look something like a list. Here's a rough sketch of what I think might work.
AArch64 OpenJDK uses four different types of call
direct call: bl address
This is the shortest and the fastest, but only has a reach of ...
far call: adrp; add; bl reg
This is longer and slower than a direct call, but can reach anywhere
in the code cache...
trampoline call:
This is only available in C2-compiled code. It is a combination of a
direct call, which is used if the destination of a call is in range,
and a register-indirect call. It has the advantages that it can
reach anywhere in the AArch64 address space and that it is patchable
at runtime when the generated code is being executed by other
threads.
bl trampoline
Stub:
trampoline:
ldr reg, pc + 8
br reg
<64-bit destination address>
indirect call: move reg, address; blr reg
This too can reach anywhere in the address space, but it cannot be
patch while code is running, so it must be used at a safepoint.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8564
More information about the hotspot-dev
mailing list