RFR: 8319801: Recursive lightweight locking: aarch64 implementation [v2]
Andrew Haley
aph at openjdk.org
Wed Nov 15 10:07:31 UTC 2023
On Wed, 15 Nov 2023 07:38:43 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 6344:
>>
>>> 6342:
>>> 6343: // Try to lock. Transition lock bits 0b01 => 0b00
>>> 6344: assert(oopDesc::mark_offset_in_bytes() == 0, "required to avoid lea");
>>
>> It might be cleaner just to put in the `lea`. I believe that nothing will be emitted if the addend is zero. It's up to you.
>
> It is only a nop if we load it into obj. And the current contract is that we do not change the value in obj. So we would still have to assert that the mark offset it 0 or we break the contract.
OK, so it's not just about avoiding an LEA. The mark word is never going to move, so it doesn't matter.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16608#discussion_r1393961126
More information about the hotspot-dev
mailing list