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

Andrew Haley aph at openjdk.java.net
Fri Jan 28 09:46:45 UTC 2022


On Fri, 28 Jan 2022 09:29:59 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> I believe that wouldn't work either. The fast path that is following this code requires that the upper 32 bits (the narrowKlass) of tmp remain intact: it shifts them to the right by 32bits and decodes the narrowKlass.

So what? tmp is untouched.

>> 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.
>
> Hmm yeah, maybe. I found one instance where flags are live around this call, but could work around it:
> 
> https://github.com/rkennke/lilliput/blob/86c13e4dfc6c1e53c9c97fc686d299c4615fd28d/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp#L587
> 
> Also, it's not only the stub that clobbers the condition flags, but the fast-path, too.

Fast path is fixable.

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

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


More information about the lilliput-dev mailing list