RFR: 8294729: [s390] Implement nmethod entry barriers

Tyler Steele tsteele at openjdk.org
Wed Oct 26 20:00:39 UTC 2022


On Tue, 11 Oct 2022 15:56:27 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

>> You are right. We don't want the '&'. I first assumed (disregarding the parentheses) this would be a field where the address of a generated stub is stored.
>
> I think I had the same thought when I wrote the code initially, so I was doubting my reasoning. Thanks for confirming :-)

After having another look at the description of `larl`, I don't think I understand why it would be a desirable replacement for `load_const`.

I replaced
`load_const(Z_R1_scratch, StubRoutines::zarch::nmethod_entry_barrier()); ... bcr(..., Z_R1_scratch);` 
with
`larl(Z_R1_scratch, StubRoutines::zarch::nmethod_entry_barrier()); ... bcr(..., Z_R1_scratch);`.
But this resulted in a bad jump since there is a mismatch between the address returned by `nmethod_entry_barrier()`, and the number of halfwords to be added to the current PC expected by `larl`. 

To make this work, it seems that I would need to compute the relative location between the current location and the address I want to jump to. Can I do this statically?

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

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


More information about the hotspot-dev mailing list