RFR: AArch64: JDK-8232046: AArch64 build failure after JDK-8225681

Andrew Dinn adinn at redhat.com
Fri Oct 11 12:51:33 UTC 2019

Hi Erik,

On 11/10/2019 13:04, erik.osterlund at oracle.com wrote:
> Looks good to me. I feel like something is weird about the 0 is
> logically -1 mapping (shouldn't it have populated the generic jump with
> -1 in the first place instead?), but that weirdness should not hold back
> this fix. Ship it.

Perhaps. Although -1 is not used anywhere else in the AArch64 code --
all other sites use a self-reference (jump target address == address of
jump) from the get-go as well as after a reset. They then lie
consistently about that to keep the generic code happy. I am not sure
there is any good reason to use that in place of -1 but I always default
to the assumption that Andrew Hayley had a reason for breaking with

So, I'd really have preferred to have used a self-reference as the
initial value in this case too. Indeed, I tried that but it failed to
relocate when the nmethod was installed. When debugging that failure I
spotted a cryptic breadcrumb comment left by Andrew Haley about relocs
not doing the right thing when the generate buffer was copied. So, I
decided to leave well alone at that point.

This may only be an artefact of Andrew Haley not understanding relocs
fully when he first wrote the code. When he is back I'll talk to him and
see if we can correct this to use a self-reference or event switching
all jumps to use -1 a an empty marker. Even if we can only manage
consistent lying about the -1 that would be an improvement.

Anyway, thanks very much for the review. As this is AArhc64 only I'll
push on that basis asap.


Andrew Dinn

More information about the jdk-dev mailing list