@@ -988,22 +988,18 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
988
988
989
989
// Class initialization barrier for static methods
990
990
address c2i_no_clinit_check_entry = NULL ;
991
-
992
991
if (VM_Version::supports_fast_class_init_checks ()) {
993
992
Label L_skip_barrier;
993
+
994
994
{ // Bypass the barrier for non-static methods
995
- Register flags = rscratch1;
996
- __ ldrw (flags, Address (rmethod, Method::access_flags_offset ()));
997
- __ tst (flags, JVM_ACC_STATIC);
998
- __ br (Assembler::NE, L_skip_barrier); // non-static
995
+ __ ldrw (rscratch1, Address (rmethod, Method::access_flags_offset ()));
996
+ __ andsw (zr, rscratch1, JVM_ACC_STATIC);
997
+ __ br (Assembler::EQ, L_skip_barrier); // non-static
999
998
}
1000
999
1001
- Register klass = rscratch1;
1002
- __ load_method_holder (klass, rmethod);
1003
- // We pass rthread to this function on x86
1004
- __ clinit_barrier (klass, rscratch2, &L_skip_barrier /* L_fast_path*/ );
1005
-
1006
- __ far_jump (RuntimeAddress (SharedRuntime::get_handle_wrong_method_stub ())); // slow path
1000
+ __ load_method_holder (rscratch2, rmethod);
1001
+ __ clinit_barrier (rscratch2, rscratch1, &L_skip_barrier);
1002
+ __ far_jump (RuntimeAddress (SharedRuntime::get_handle_wrong_method_stub ()));
1007
1003
1008
1004
__ bind (L_skip_barrier);
1009
1005
c2i_no_clinit_check_entry = __ pc ();
0 commit comments