--- old/src/cpu/sparc/vm/jniFastGetField_sparc.cpp 2017-04-25 16:43:42.791177011 +0200 +++ new/src/cpu/sparc/vm/jniFastGetField_sparc.cpp 2017-04-25 16:43:42.643177017 +0200 @@ -67,9 +67,13 @@ __ ld (cnt_addr, G4); __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); - __ delayed()->srl (O2, 2, O4); - __ andn (O1, JNIHandles::weak_tag_mask, O1); - __ ld_ptr (O1, 0, O5); + __ delayed()->andcc(O1, JNIHandles::weak_tag_mask, G0); // Test for jweak + + // Annul the resolving load if it is a jweak + __ br(Assembler::notZero, true, Assembler::pt, label1); + __ delayed()->ld_ptr (O1, 0, O5); + + __ srl(O2, 2, O4); assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); speculative_load_pclist[count] = __ pc();