8230486: G1BarrierSetAssembler::g1_write_barrier_post unnecessarily pushes/pops new_val

Reviewed-by: kbarrett, tschatzl
This commit is contained in:
Albert Mingkun Yang 2021-05-18 13:58:37 +00:00
parent 9d168e25d1
commit f8f40ab25f
2 changed files with 1 additions and 3 deletions

View File

@ -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);

View File

@ -329,7 +329,6 @@ 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
@ -337,7 +336,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
__ 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);