Skip to content

Commit

Permalink
8255401: Shenandoah: Allow oldval and newval registers to overlap in …
Browse files Browse the repository at this point in the history
…cmpxchg_oop()

Reviewed-by: roland
  • Loading branch information
rkennke committed Nov 2, 2020
1 parent a3aad11 commit 0e19ded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

1 comment on commit 0e19ded

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.