[master] RFR: Load narrowKlass from header, AArch64 assembler implementation [v3]

Andrew Haley aph at openjdk.java.net
Fri Jan 28 09:27:42 UTC 2022


On Thu, 27 Jan 2022 17:27:46 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> This implements MacroAssembler::load_klass() to load the (narrow)Klass* from object header. Just like the x86_64 implementation, it checks whether it can take the fast path (object unlocked -> load from upper 32bits of header), or else calls the runtime to get a stable header and load from that.
>> 
>> It adds a runtime call stub, which will also be used in the C2 implementation. It also adds nklass_offset_in_bytes() which will also be used in C2 impl. The part in generate_verify_oop() is a little nasty, I added a comment that explains what's going on.
>> 
>> Testing:
>>  - [x] tier1 (aarch64)
>>  - [x] tier2 (aarch64)
>>  - [x] tier3 (aarch64)
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Aph's suggestions

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 6620:

> 6618:     __ enter();
> 6619:     __ push_call_clobbered_registers_except(r0);
> 6620:     __ call_VM_leaf(CAST_FROM_FN_PTR(address, oopDesc::load_nklass_runtime), 1);

I'm tempted to suggest saving flags here too. But I guess you've checked all the places that use `load_klass()`. At least the comment for `load_klass()` should advertise exactly what gets clobbered.

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

PR: https://git.openjdk.java.net/lilliput/pull/36


More information about the lilliput-dev mailing list