Skip to content
Permalink
Browse files
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 f8f40ab25ffce0243a40f307b0341cddd12ccb5d
Showing with 1 addition and 3 deletions.
  1. +1 −1 src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp
  2. +0 −2 src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp
@@ -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);
@@ -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);

0 comments on commit f8f40ab

Please sign in to comment.