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

Andrew Dinn adinn at redhat.com
Tue Dec 9 15:02:09 UTC 2014


On 09/12/14 14:55, Andrew Dinn wrote:
> 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);

Oops, sorry  that's back to front -- the comment looks like it ought to
be the other way round i.e. rmethod used for to_interp code and
rscratch1 for trampoline calls.

regards,


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



More information about the aarch64-port-dev mailing list