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

Roman Kennke rkennke at openjdk.java.net
Tue Feb 1 13:17:03 UTC 2022


On Mon, 31 Jan 2022 12:59:12 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:
> 
>   Cleanups and document load_klass(), preserve rscratch1 and rscratch2 in runtime call stub

I pushed more changes:
 - Split load_klass() and load_nklass() (we need the nklass version separately in a few places)
 - Cleanup remaining direct loads from klass_offset_in_bytes() in aarch64, replacing them with load_[n]klass()
 - Pass correct offset to null-checks that are preceding load_klass()
 - Trim code size estimate

@theRealAph and/or @shipilev please re-review? Thanks!

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

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


More information about the lilliput-dev mailing list