< prev index next >

src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp

Print this page
@@ -152,16 +152,12 @@
    // Record the previous value
    __ str(pre_val, Address(tmp, 0));
    __ b(done);
  
    __ bind(runtime);
-   // save the live input values
-   RegSet saved = RegSet::of(pre_val);
-   if (tosca_live) saved += RegSet::of(r0);
-   if (obj != noreg) saved += RegSet::of(obj);
  
-   __ push(saved, sp);
+   __ push_call_clobbered_registers();
  
    // Calling the runtime using the regular call_VM_leaf mechanism generates
    // code (generated by InterpreterMacroAssember::call_VM_leaf_base)
    // that checks that the *(rfp+frame::interpreter_frame_last_sp) == NULL.
    //

@@ -178,11 +174,11 @@
      __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_pre_entry), pre_val, thread);
    } else {
      __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_pre_entry), pre_val, thread);
    }
  
-   __ pop(saved, sp);
+   __ pop_call_clobbered_registers();
  
    __ bind(done);
  
  }
  
< prev index next >