RFR: 8319801: Recursive lightweight locking: aarch64 implementation [v16]

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Feb 13 13:33:07 UTC 2024


On Tue, 13 Feb 2024 12:42:14 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 6371:
>> 
>>> 6369: 
>>> 6370:   // Check header for monitor (0b10).
>>> 6371:   tst(mark, markWord::monitor_value);
>> 
>> Do you need the flag here, or can you use `tbnz`?
>
> Not after this change. (Will double check, but it should only be C2 that required this and C2 does no longer use `MacroAssembler::lightweight_lock`) It can be a `tbnz`.

Just did a quick sanity check. The destination will be to far away for `tbnz`. This behaviour rings a bell for me. I probably tried this before. Maybe should add a comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16608#discussion_r1487852305


More information about the hotspot-dev mailing list