8317581: [s390x] Multiple test failure with LockingMode=2

Reviewed-by: stuefe, lucy
This commit is contained in:
Amit Kumar 2023-10-12 03:33:30 +00:00
parent 387896fb34
commit 839cb19ec2
2 changed files with 4 additions and 3 deletions

View File

@ -140,7 +140,8 @@ class RelAddr {
if ((target == nullptr) || (target == pc)) {
return 0; // Yet unknown branch destination.
} else {
guarantee(is_in_range_of_RelAddr(target, pc, shortForm), "target not within reach");
guarantee(is_in_range_of_RelAddr(target, pc, shortForm),
"target not within reach at " INTPTR_FORMAT ", distance = " INTX_FORMAT, p2i(pc), (target - pc) );
return (int)((target - pc)>>1);
}
}

View File

@ -101,7 +101,7 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
if (DiagnoseSyncOnValueBasedClasses != 0) {
load_klass(tmp, Roop);
testbit(Address(tmp, Klass::access_flags_offset()), exact_log2(JVM_ACC_IS_VALUE_BASED_CLASS));
z_btrue(slow_case);
branch_optimized(Assembler::bcondAllOne, slow_case);
}
assert(LockingMode != LM_MONITOR, "LM_MONITOR is already handled, by emit_lock()");
@ -170,7 +170,7 @@ void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rb
z_lg(Rmark, Address(Roop, hdr_offset));
z_lgr(tmp, Rmark);
z_nill(tmp, markWord::monitor_value);
z_brnz(slow_case);
branch_optimized(Assembler::bcondNotZero, slow_case);
lightweight_unlock(Roop, Rmark, tmp, slow_case);
} else if (LockingMode == LM_LEGACY) {
// Test if object header is pointing to the displaced header, and if so, restore