< prev index next >

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Print this page

        

@@ -3012,22 +3012,23 @@
   intptr_t mask = ((intptr_t)3) - ((intptr_t)os::vm_page_size());
   Assembler::LogicalImmediate imm(mask, false);
   mov(Rscratch, SP);
   sub(Rscratch, Rmark, Rscratch);
   ands(Rscratch, Rscratch, imm);
-  b(done, ne); // exit with failure
-  str(Rscratch, Address(Rbox, BasicLock::displaced_header_offset_in_bytes())); // set to zero
+  // set to zero if recursive lock, set to non zero otherwise (see discussion in JDK-8153107)
+  str(Rscratch, Address(Rbox, BasicLock::displaced_header_offset_in_bytes()));
   b(done);
 
 #else
   // -1- test low 2 bits
   movs(Rscratch, AsmOperand(Rmark, lsl, 30));
   // -2- test (hdr - SP) if the low two bits are 0
   sub(Rscratch, Rmark, SP, eq);
   movs(Rscratch, AsmOperand(Rscratch, lsr, exact_log2(os::vm_page_size())), eq);
   // If still 'eq' then recursive locking OK
-  str(Rscratch, Address(Rbox, BasicLock::displaced_header_offset_in_bytes()), eq); // set to zero
+  // set to zero if recursive lock, set to non zero otherwise (see discussion in JDK-8153107)
+  str(Rscratch, Address(Rbox, BasicLock::displaced_header_offset_in_bytes()));
   b(done);
 #endif
 
   bind(fast_lock);
   str(Rmark, Address(Rbox, BasicLock::displaced_header_offset_in_bytes()));
< prev index next >