equal
deleted
inserted
replaced
1189 movptr(Address(lock_reg, mark_offset), swap_reg); |
1189 movptr(Address(lock_reg, mark_offset), swap_reg); |
1190 |
1190 |
1191 assert(lock_offset == 0, |
1191 assert(lock_offset == 0, |
1192 "displaced header must be first word in BasicObjectLock"); |
1192 "displaced header must be first word in BasicObjectLock"); |
1193 |
1193 |
1194 if (os::is_MP()) lock(); |
1194 lock(); |
1195 cmpxchgptr(lock_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes())); |
1195 cmpxchgptr(lock_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes())); |
1196 if (PrintBiasedLockingStatistics) { |
1196 if (PrintBiasedLockingStatistics) { |
1197 cond_inc32(Assembler::zero, |
1197 cond_inc32(Assembler::zero, |
1198 ExternalAddress((address) BiasedLocking::fast_path_entry_count_addr())); |
1198 ExternalAddress((address) BiasedLocking::fast_path_entry_count_addr())); |
1199 } |
1199 } |
1286 |
1286 |
1287 // zero for recursive case |
1287 // zero for recursive case |
1288 jcc(Assembler::zero, done); |
1288 jcc(Assembler::zero, done); |
1289 |
1289 |
1290 // Atomic swap back the old header |
1290 // Atomic swap back the old header |
1291 if (os::is_MP()) lock(); |
1291 lock(); |
1292 cmpxchgptr(header_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes())); |
1292 cmpxchgptr(header_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes())); |
1293 |
1293 |
1294 // zero for simple unlock of a stack-lock case |
1294 // zero for simple unlock of a stack-lock case |
1295 jcc(Assembler::zero, done); |
1295 jcc(Assembler::zero, done); |
1296 |
1296 |