Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8230486: G1BarrierSetAssembler::g1_write_barrier_post unnecessarily p…
…ushes/pops new_val

Reviewed-by: kbarrett, tschatzl
  • Loading branch information
albertnetymk committed May 18, 2021
1 parent 9d168e2 commit f8f40ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Expand Up @@ -254,7 +254,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,

__ bind(runtime);
// save the live input values
RegSet saved = RegSet::of(store_addr, new_val);
RegSet saved = RegSet::of(store_addr);
__ push(saved, sp);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, thread);
__ pop(saved, sp);
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp
Expand Up @@ -329,15 +329,13 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
__ bind(runtime);
// save the live input values
__ push(store_addr);
__ push(new_val);
#ifdef _LP64
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, r15_thread);
#else
__ push(thread);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, thread);
__ pop(thread);
#endif
__ pop(new_val);
__ pop(store_addr);

__ bind(done);
Expand Down

1 comment on commit f8f40ab

@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.