[aarch64-port-dev ] RFR: Large code cache

Andrew Dinn adinn at redhat.com
Tue Dec 9 14:55:45 UTC 2014


One more thing. I am not sure about the validity of this comment which
occurs in the middle of MacroAssembler::emit_trampoline_stub()

+  // For java_to_interp stubs we use rscratch1 as scratch register and
+  // in call trampoline stubs we use rmethod. This way we can
+  // distinguish them (see is_NativeCallTrampolineStub_at()).

The code in compiledIC_aarch64.cpp has been changed to use rscratch1

@@ -70,7 +70,8 @@
   __ relocate(static_stub_Relocation::spec(mark));
   // static stub relocation also tags the Method* in the code-stream.
   __ mov_metadata(rmethod, (Metadata*)NULL);
-  __ b(__ pc());
+  __ movptr(rscratch1, 0);
+  __ br(rscratch1);

But the code in emit_trampoline_stub also uses rscratch1

+  const int stub_start_offset = offset();
+
+  // Now, create the trampoline stub's code:
+  // - load the call
+  // - call
+  Label target;
+  ldr(rscratch1, target);
+  br(rscratch1);
+  bind(target);
   . . .

The comment looks like it is supposed to be true since
is_NativeCallTrampolineStub_at() does indeed check for rscratch1. So
does that mean that the patch to compiledIC_aarch64.cpp ought to use
rmethod as follows?

@@ -70,7 +70,8 @@
   __ relocate(static_stub_Relocation::spec(mark));
   // static stub relocation also tags the Method* in the code-stream.
   __ mov_metadata(rmethod, (Metadata*)NULL);
-  __ b(__ pc());
+  __ movptr(rmethod, 0);
+  __ br(rmethod);

regards,


Andrew Dinn
-----------



More information about the aarch64-port-dev mailing list