[aarch64-port-dev ] RFR: 8223173: Implement fast class initialization checks on AARCH64
Dmitrij Pochepko
dmitrij.pochepko at bell-sw.com
Fri Jun 21 17:57:15 UTC 2019
On 21/06/2019 4:28 PM, Andrew Haley wrote:
> On 6/21/19 1:34 PM, Dmitrij Pochepko wrote:
>
>> Please review this fix for JDK 14. Once this is in, I'd like to request
>> approval for backporting to JDK 13 since corresponding fixes for x86_64
>> and PPC are in JDK 13 already, unless the community feels otherwise.
> Please don't use aliases for scratch registers unless it's necessary:
>
> + { // Bypass the barrier for non-static methods
> + Register flags = rscratch1;
> + __ ldrw(flags, Address(rmethod, Method::access_flags_offset()));
> + __ andsw(zr, flags, JVM_ACC_STATIC);
> + __ br(Assembler::EQ, L_skip_barrier); // non-static
> + }
>
> The use of rscratch1 and rscratch2 in clinit_barrier() is very tricky. It
> would be safer to write clinit_barrier() in a way that uses no scratch
> registers other than the ones that it is passed.
>
> Register thread should not be an argument.
>
> So, declare MacroAssembler::clinit_barrier as:
>
> void MacroAssembler::clinit_barrier(Register klass, Register scratch, Label* L_fast_path, Label* L_slow_path) {
>
> Otherwise this looks OK, thanks.
>
webrev 02 with with aliases removed and clinit_barrier declaration and
invocation changed: http://cr.openjdk.java.net/~dpochepk/8223173/webrev.02/
I also ran hotspot jtreg tier1-3 tests in fastdebug mode as sanity check
Thanks,
Dmitrij
More information about the aarch64-port-dev
mailing list