8255401: Shenandoah: Allow oldval and newval registers to overlap in cmpxchg_oop()

Reviewed-by: roland
This commit is contained in:
Roman Kennke 2020-11-02 16:01:18 +00:00
parent a3aad11918
commit 0e19ded93d
2 changed files with 4 additions and 2 deletions

View File

@ -477,7 +477,8 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
bool is_narrow = UseCompressedOops;
Assembler::operand_size size = is_narrow ? Assembler::word : Assembler::xword;
assert_different_registers(addr, expected, new_val, tmp1, tmp2);
assert_different_registers(addr, expected, tmp1, tmp2);
assert_different_registers(addr, new_val, tmp1, tmp2);
Label step4, done;

View File

@ -638,7 +638,8 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
bool exchange, Register tmp1, Register tmp2) {
assert(ShenandoahCASBarrier, "Should only be used when CAS barrier is enabled");
assert(oldval == rax, "must be in rax for implicit use in cmpxchg");
assert_different_registers(oldval, newval, tmp1, tmp2);
assert_different_registers(oldval, tmp1, tmp2);
assert_different_registers(newval, tmp1, tmp2);
Label L_success, L_failure;