[aarch64-port-dev ] RFR: 8223173: Implement fast class initialization checks on AARCH64

Andrew Haley aph at redhat.com
Fri Jun 21 13:28:39 UTC 2019


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.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the aarch64-port-dev mailing list