< prev index next >
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
Print this page
rev 51633 : imported patch 8210381
@@ -2846,16 +2846,10 @@
// Load markOop from object into displaced_header.
ld(displaced_header, oopDesc::mark_offset_in_bytes(), oop);
- // Always do locking in runtime.
- if (EmitSync & 0x01) {
- cmpdi(flag, oop, 0); // Oop can't be 0 here => always false.
- return;
- }
-
if (try_bias) {
biased_locking_enter(flag, oop, displaced_header, temp, current_header, cont);
}
#if INCLUDE_RTM_OPT
@@ -2865,15 +2859,13 @@
cont, object_has_monitor);
}
#endif // INCLUDE_RTM_OPT
// Handle existing monitor.
- if ((EmitSync & 0x02) == 0) {
// The object has an existing monitor iff (mark & monitor_value) != 0.
andi_(temp, displaced_header, markOopDesc::monitor_value);
bne(CCR0, object_has_monitor);
- }
// Set displaced_header to be (markOop of object | UNLOCK_VALUE).
ori(displaced_header, displaced_header, markOopDesc::unlocked_value);
// Load Compare Value application register.
@@ -2912,11 +2904,10 @@
// displaced header in the box, which indicates that it is a recursive lock.
mcrf(flag,CCR0);
std(R0/*==0, perhaps*/, BasicLock::displaced_header_offset_in_bytes(), box);
// Handle existing monitor.
- if ((EmitSync & 0x02) == 0) {
b(cont);
bind(object_has_monitor);
// The object's monitor m is unlocked iff m->owner == NULL,
// otherwise m->owner may contain a thread or a stack address.
@@ -2953,11 +2944,10 @@
# endif
#if INCLUDE_RTM_OPT
} // use_rtm()
#endif
- }
bind(cont);
// flag == EQ indicates success
// flag == NE indicates failure
}
@@ -2968,16 +2958,10 @@
assert_different_registers(oop, box, temp, displaced_header, current_header);
assert(flag != CCR0, "bad condition register");
Label cont;
Label object_has_monitor;
- // Always do locking in runtime.
- if (EmitSync & 0x01) {
- cmpdi(flag, oop, 0); // Oop can't be 0 here => always false.
- return;
- }
-
if (try_bias) {
biased_locking_exit(flag, oop, current_header, cont);
}
#if INCLUDE_RTM_OPT
@@ -3000,17 +2984,15 @@
// If the displaced header is 0, we have a recursive unlock.
cmpdi(flag, displaced_header, 0);
beq(flag, cont);
// Handle existing monitor.
- if ((EmitSync & 0x02) == 0) {
// The object has an existing monitor iff (mark & monitor_value) != 0.
RTM_OPT_ONLY( if (!(UseRTMForStackLocks && use_rtm)) ) // skip load if already done
ld(current_header, oopDesc::mark_offset_in_bytes(), oop);
andi_(R0, current_header, markOopDesc::monitor_value);
bne(CCR0, object_has_monitor);
- }
// Check if it is still a light weight lock, this is is true if we see
// the stack address of the basicLock in the markOop of the object.
// Cmpxchg sets flag to cmpd(current_header, box).
cmpxchgd(/*flag=*/flag,
@@ -3024,11 +3006,10 @@
&cont);
assert(oopDesc::mark_offset_in_bytes() == 0, "offset of _mark is not 0");
// Handle existing monitor.
- if ((EmitSync & 0x02) == 0) {
b(cont);
bind(object_has_monitor);
addi(current_header, current_header, -markOopDesc::monitor_value); // monitor
ld(temp, ObjectMonitor::owner_offset_in_bytes(), current_header);
@@ -3057,11 +3038,10 @@
orr(temp, temp, displaced_header); // Will be 0 if both are 0.
cmpdi(flag, temp, 0);
bne(flag, cont);
release();
std(temp, ObjectMonitor::owner_offset_in_bytes(), current_header);
- }
bind(cont);
// flag == EQ indicates success
// flag == NE indicates failure
}
< prev index next >