8231583: Shenandoah: Fix register clash in SBSA::resolve_forwarding_pointer() borrowing

Reviewed-by: rkennke
This commit is contained in:
Aleksey Shipilev 2019-09-30 18:02:24 +02:00
parent 722b4b4fda
commit 8a50aa7d21
2 changed files with 10 additions and 0 deletions

View File

@ -211,9 +211,14 @@ void ShenandoahBarrierSetAssembler::resolve_forward_pointer_not_null(MacroAssemb
if (borrow_reg) {
// No free registers available. Make one useful.
tmp = rscratch1;
if (tmp == dst) {
tmp = rscratch2;
}
__ push(RegSet::of(tmp), sp);
}
assert_different_registers(tmp, dst);
Label done;
__ ldr(tmp, Address(dst, oopDesc::mark_offset_in_bytes()));
__ eon(tmp, tmp, zr);

View File

@ -271,9 +271,14 @@ void ShenandoahBarrierSetAssembler::resolve_forward_pointer_not_null(MacroAssemb
if (borrow_reg) {
// No free registers available. Make one useful.
tmp = LP64_ONLY(rscratch1) NOT_LP64(rdx);
if (tmp == dst) {
tmp = LP64_ONLY(rscratch2) NOT_LP64(rcx);
}
__ push(tmp);
}
assert_different_registers(dst, tmp);
Label done;
__ movptr(tmp, Address(dst, oopDesc::mark_offset_in_bytes()));
__ notptr(tmp);