[aarch64-port-dev ] Don't use any form of _call_VM_leaf when we're calling a stub

Andrew Haley aph at redhat.com
Thu May 29 17:24:07 UTC 2014


The CRC32 patch broke the builtin simulator.  It was calling a
(AArch64 code) stub routine vi blrt, which is really only for runtime
code.  Fixed thusly.

Andrew.


# HG changeset patch
# User aph
# Date 1401381523 -3600
#      Thu May 29 17:38:43 2014 +0100
# Node ID 79225ea063f38fab53c57211175d2588218c7871
# Parent  fc99103df98d5697bb3008aafb8242d6937e3425
Don't use any form of _call_VM_leaf when we're calling a stub.
Jump directly to the stub after adjusting the stack.

diff -r fc99103df98d -r 79225ea063f3 src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
--- a/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp        Wed May 28 10:08:48 2014 +0100
+++ b/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp        Thu May 29 17:38:43 2014 +0100
@@ -775,11 +775,10 @@
     // Can now load 'len' since we're finished with 'off'
     __ ldrw(len, Address(esp, 0x0)); // Length

-    __ mov(rscratch1, lr); // saved by call_VM_leaf
-    __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()), crc, buf, len);
+    __ andr(sp, r13, -16); // Restore the caller's SP

-    __ andr(sp, r13, -16);
-    __ ret(rscratch1);
+    // We are frameless so we can just jump to the stub.
+    __ b(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()));

     // generate a vanilla native entry as the slow path
     __ bind(slow_path);
@@ -1215,7 +1214,7 @@
   //       not properly paired (was bug - gri 11/22/99).
   __ notify_method_exit(vtos, InterpreterMacroAssembler::NotifyJVMTI);

-  // restore potential result in edx:eax, call result handler to
+  // restore potential result in r0:d0, call result handler to
   // restore potential result in ST0 & handle result

   __ pop(ltos);


More information about the aarch64-port-dev mailing list