src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp
changeset 50024 7238cb613dc5
parent 49906 4bb58f644e4e
child 50110 3d98842c8677
--- a/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp	Sat May 05 22:19:19 2018 +0200
+++ b/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp	Sun May 06 00:42:59 2018 +0200
@@ -259,6 +259,8 @@
   bool on_reference = on_weak || on_phantom;
   ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
   if (on_oop && on_reference) {
+    // LR is live.  It must be saved around calls.
+    __ enter(); // barrier may call runtime
     // Generate the G1 pre-barrier code to log the value of
     // the referent field in an SATB buffer.
     g1_write_barrier_pre(masm /* masm */,
@@ -268,6 +270,7 @@
                          tmp1 /* tmp */,
                          true /* tosca_live */,
                          true /* expand_call */);
+    __ leave();
   }
 }