[master] RFR: 8303813: [Lilliput] (AArch64) Use tbz instead of tst and br in load_klass()
Paul Hohensee
phh at openjdk.org
Wed Mar 8 21:50:40 UTC 2023
On Wed, 8 Mar 2023 21:46:04 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 4266:
>>
>>> 4264: // Check if we can take the (common) fast path, if obj is unlocked.
>>> 4265: ldr(dst, Address(src, oopDesc::mark_offset_in_bytes()));
>>> 4266: tbz(dst, exact_log2(markWord::monitor_value), fast);
>>
>> This is a bit fragile because monitor_value must be a power of 2 for it to work.
>
> Yes, and it is (and hopefully, always will be - or else that code would need to be changed anyway). exact_log2() has an assert that checks exactly that.
Missed the latter. Lgtm.
-------------
PR: https://git.openjdk.org/lilliput/pull/78
More information about the lilliput-dev
mailing list