< prev index next >

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Print this page
rev 54101 : 8214512: ARM32: Jtreg test compiler/c2/Test8062950.java fails on ARM
Reviewed-by: dlong, enevill, bulasevich
Contributed-by: nick.gasson@arm.com, christoph.goettschkes@microdoc.com

*** 2994,3004 **** #endif // ASSERT #endif // AARCH64 #ifdef COMPILER2 ! void MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratch, Register Rscratch2 AARCH64_ONLY_ARG(Register Rscratch3)) { assert(VM_Version::supports_ldrex(), "unsupported, yet?"); Register Rmark = Rscratch2; --- 2994,3004 ---- #endif // ASSERT #endif // AARCH64 #ifdef COMPILER2 ! void MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratch, Register Rscratch2, Register scratch3) { assert(VM_Version::supports_ldrex(), "unsupported, yet?"); Register Rmark = Rscratch2;
*** 3008,3026 **** assert(Rbox != Rmark, ""); Label fast_lock, done; if (UseBiasedLocking && !UseOptoBiasInlining) { ! Label failed; ! #ifdef AARCH64 ! biased_locking_enter(Roop, Rmark, Rscratch, false, Rscratch3, done, failed); ! #else ! biased_locking_enter(Roop, Rmark, Rscratch, false, noreg, done, failed); ! #endif ! bind(failed); } ldr(Rmark, Address(Roop, oopDesc::mark_offset_in_bytes())); tst(Rmark, markOopDesc::unlocked_value); b(fast_lock, ne); // Check for recursive lock --- 3008,3024 ---- assert(Rbox != Rmark, ""); Label fast_lock, done; if (UseBiasedLocking && !UseOptoBiasInlining) { ! assert(scratch3 != noreg, "need extra temporary for -XX:-UseOptoBiasInlining"); ! biased_locking_enter(Roop, Rmark, Rscratch, false, scratch3, done, done); ! // Fall through if lock not biased otherwise branch to done } + // Invariant: Rmark loaded below does not contain biased lock pattern + ldr(Rmark, Address(Roop, oopDesc::mark_offset_in_bytes())); tst(Rmark, markOopDesc::unlocked_value); b(fast_lock, ne); // Check for recursive lock
*** 3055,3064 **** --- 3053,3065 ---- bool one_shot = true; cas_for_lock_acquire(Rmark, Rbox, Roop, Rscratch, done, allow_fallthrough_on_failure, one_shot); bind(done); + // At this point flags are set as follows: + // EQ -> Success + // NE -> Failure, branch to slow path } void MacroAssembler::fast_unlock(Register Roop, Register Rbox, Register Rscratch, Register Rscratch2 AARCH64_ONLY_ARG(Register Rscratch3)) { assert(VM_Version::supports_ldrex(), "unsupported, yet?");
< prev index next >