[aarch64-port-dev ] RFR(S): 8236992: AArch64: remove redundant load_klass in itable stub
Andrew Dinn
adinn at redhat.com
Thu Jan 16 09:45:22 UTC 2020
On 16/01/2020 09:00, Nick Gasson wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8236992
> Webrev: http://cr.openjdk.java.net/~ngasson/8236992/webrev.01/index.html
>
> The X86 implementation of VtableStubs::create_itable_stub calls
> load_klass() twice on the same oop because the destination register
> needs to be reused as a temporary in the intervening
> lookup_interface_method(). But on AArch64 we have more registers and no
> callee-saves so we can just allocate an additional temporary register
> and keep the result of load_klass live across the whole function.
>
> Also the estimate of the stub size needs to be recalculated as it was
> too low before the fix for JDK-8234794 and now it's too high. The worst
> case instruction size should be 12 for load_klass, 44 for
> lookup_interface method with return_method=false, and 60 with
> return_method=true, for a total of 116 bytes. Previously the worst case
> for load_klass was 28 bytes and it was called twice, so the estimate
> should have been 160. Added eight bytes headroom as per the comment.
The code changes look ok to me.
Did you test it? :-)
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill
More information about the aarch64-port-dev
mailing list