RFR: 8294729: [s390] Implement nmethod entry barriers

Lutz Schmidt lucy at openjdk.org
Wed Oct 26 20:00:41 UTC 2022


On Fri, 7 Oct 2022 17:02:25 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

>> src/hotspot/cpu/s390/stubGenerator_s390.cpp line 2891:
>> 
>>> 2889:     __ z_cfi(Z_R2, 0);
>>> 2890:     __ z_bcr(Assembler::bcondNotEqual, Z_R14);
>>> 2891: 
>> 
>> `z_ltr(Z_R2, Z_R2);`
>> is the preferred way of testing register contents. I would then use the "speaking" alias
>> `z_brnz(Z_R14);
>> Note: there are subtle semantic differences between "not equal" and "not zero". See assembler_s390.hpp.
>
> I changed to the preferred test instruction. However, it seems like z_brnz won't work in this situation because the branch address is in a register and not a label.
> 
> Side note it too me a second to realize that I am using bcr and brnz is an alias for brc. It seems odd that there isn't a "speaking" alias for bcr (or maybe I'm just not finding it).

You are right. There are no "speaking" aliases for brc. "Branch on Condition" is not used frequently in VM code. Therefore, nobody felt enough pain so far to define the aliases.
May I please request you use the condition `Assembler::bcondNotZero`? `LTR` compares the register value against zero.

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

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


More information about the hotspot-dev mailing list