src/hotspot/cpu/arm/sharedRuntime_arm.cpp
changeset 57777 90ead0febf56
parent 57710 05ff6e27de45
child 58554 8c3c39710a08
equal deleted inserted replaced
57774:21dccfac0ec5 57777:90ead0febf56
   859       __ bx(LR, eq);
   859       __ bx(LR, eq);
   860     }
   860     }
   861 
   861 
   862     __ ldr(Rtemp, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
   862     __ ldr(Rtemp, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
   863 
   863 
   864     assert(markOopDesc::unlocked_value == 1, "adjust this code");
   864     assert(markWord::unlocked_value == 1, "adjust this code");
   865     __ tbz(Rtemp, exact_log2(markOopDesc::unlocked_value), slow_case);
   865     __ tbz(Rtemp, exact_log2(markWord::unlocked_value), slow_case);
   866 
   866 
   867     if (UseBiasedLocking) {
   867     if (UseBiasedLocking) {
   868       assert(is_power_of_2(markOopDesc::biased_lock_bit_in_place), "adjust this code");
   868       assert(is_power_of_2(markWord::biased_lock_bit_in_place), "adjust this code");
   869       __ tbnz(Rtemp, exact_log2(markOopDesc::biased_lock_bit_in_place), slow_case);
   869       __ tbnz(Rtemp, exact_log2(markWord::biased_lock_bit_in_place), slow_case);
   870     }
   870     }
   871 
   871 
   872     __ bics(Rtemp, Rtemp, ~markOopDesc::hash_mask_in_place);
   872     __ bics(Rtemp, Rtemp, ~markWord::hash_mask_in_place);
   873     __ mov(R0, AsmOperand(Rtemp, lsr, markOopDesc::hash_shift), ne);
   873     __ mov(R0, AsmOperand(Rtemp, lsr, markWord::hash_shift), ne);
   874     __ bx(LR, ne);
   874     __ bx(LR, ne);
   875 
   875 
   876     __ bind(slow_case);
   876     __ bind(slow_case);
   877   }
   877   }
   878 
   878 
  1170     // On MP platforms the next load could return a 'stale' value if the memory location has been modified by another thread.
  1170     // On MP platforms the next load could return a 'stale' value if the memory location has been modified by another thread.
  1171     // That would be acceptable as either CAS or slow case path is taken in that case
  1171     // That would be acceptable as either CAS or slow case path is taken in that case
  1172 
  1172 
  1173     __ ldr(mark, Address(sync_obj, oopDesc::mark_offset_in_bytes()));
  1173     __ ldr(mark, Address(sync_obj, oopDesc::mark_offset_in_bytes()));
  1174     __ sub(disp_hdr, FP, lock_slot_fp_offset);
  1174     __ sub(disp_hdr, FP, lock_slot_fp_offset);
  1175     __ tst(mark, markOopDesc::unlocked_value);
  1175     __ tst(mark, markWord::unlocked_value);
  1176     __ b(fast_lock, ne);
  1176     __ b(fast_lock, ne);
  1177 
  1177 
  1178     // Check for recursive lock
  1178     // Check for recursive lock
  1179     // See comments in InterpreterMacroAssembler::lock_object for
  1179     // See comments in InterpreterMacroAssembler::lock_object for
  1180     // explanations on the fast recursive locking check.
  1180     // explanations on the fast recursive locking check.