[master] RFR: OMWorld: Cleanups [v2]
Coleen Phillimore
coleenp at openjdk.org
Fri May 24 17:55:20 UTC 2024
On Fri, 24 May 2024 15:06:20 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 502:
>>
>>> 500: ldr(t1_monitor, Address(box, BasicLock::object_monitor_cache_offset_in_bytes()));
>>> 501: // null check with Flags == NE, no valid pointer below alignof(ObjectMonitor*)
>>> 502: cmp(t1_monitor, checked_cast<uint8_t>(alignof(ObjectMonitor*)));
>>
>> I don't know what this means.
>
> Maybe I should say `valid ObjectMonitor* check` instead of `null check`.
>
> The reason that the check used to be against `2` is because some iterations of the code have signalled information in the lowest bit.
>
> Currently it could just be a check agains `1` which would check for `nullptr` while also setting Flags to NE.
>
> The check is simply that based on the fact that no valid ObjectMonitor* except nullptr can exist below `alignof(ObjectMonitor*)`.
But in the current code now, the field should be either nullptr or a valid ObjectMonitor, right? If you simply checked against nullptr, would it set the NE flags? All the extra casting etc makes this a puzzler where testing against nullptr does what it says.
-------------
PR Review Comment: https://git.openjdk.org/lilliput/pull/178#discussion_r1613831179
More information about the lilliput-dev
mailing list