changeset 12319:52d18f20804b

8170100: AArch64: Crash in C1-compiled code accessing References Reviewed-by: roland
author aph
date Mon, 21 Nov 2016 17:38:13 +0000
parents 42a27dc44adc
children 6f8884f94c25
files src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Mon Nov 21 17:29:17 2016 +0000
+++ b/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Mon Nov 21 17:38:13 2016 +0000
@@ -886,7 +886,7 @@
   //   and so we don't need to call the G1 pre-barrier. Thus we can use the
   //   regular method entry code to generate the NPE.
   //
-  // This code is based on generate_accessor_enty.
+  // This code is based on generate_accessor_entry.
   //
   // rmethod: Method*
   // r13: senderSP must preserve for slow path, set SP to it on fast path
@@ -904,11 +904,11 @@
     __ ldr(local_0, Address(esp, 0));
     __ cbz(local_0, slow_path);
 
-
     // Load the value of the referent field.
     const Address field_address(local_0, referent_offset);
     __ load_heap_oop(local_0, field_address);
 
+    __ mov(r19, r13);   // Move senderSP to a callee-saved register
     // Generate the G1 pre-barrier code to log the value of
     // the referent field in an SATB buffer.
     __ enter(); // g1_write may call runtime
@@ -920,7 +920,7 @@
                             true /* expand_call */);
     __ leave();
     // areturn
-    __ andr(sp, r13, -16);  // done with stack
+    __ andr(sp, r19, -16);  // done with stack
     __ ret(lr);
 
     // generate a vanilla interpreter entry as the slow path