[aarch64-port-dev ] RFR: JDK-8205004: AArch64: fix failures in jtreg ArraysEqCmpTest

Joshua Zhu Joshua.Zhu at arm.com
Thu Jun 21 13:09:27 UTC 2018


Hi Andrew,

Thanks for your comments. 
I have updated new webrev at
http://cr.openjdk.java.net/~zyao/8205004/webrev.03/

Best Regards,
Joshua

> -----Original Message-----
> From: Andrew Haley <aph at redhat.com>
> Sent: Wednesday, June 20, 2018 4:58 PM
> 
> On 06/20/2018 09:26 AM, Joshua Zhu wrote:
> > http://hg.openjdk.java.net/jdk/jdk/file/e810abb27deb/src/hotspot/cpu/a
> > arch64/macroAssembler_aarch64.cpp#l5134
> 
> Ah yes, you're right.  It went in last week.  I missed that.  That is misleading
> code: it's relying on cmpoop providing the read barrier for both arrays, and it
> has a side effect on both pointers.
> 
> We need to tidy this up a little bit for readability.  Please lift the
> 
>     cmpoop(a1, a2);
>     br(EQ, SAME);
> 
> out of the if (UseSimpleArrayEquals) conditional and put a big red flag beside
> the cmpoop, like so:
> 
>     cmpoop(a1, a2);   // Read barrier for a1 and a2.
>     br(EQ, SAME);
> 
> Then we don't need to use cmpoop anywhere else.
> 
> The layout of the function header is wrong:
> 
> void MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
>                                    Register tmp4, Register tmp5, Register result,
>                                    Register cnt1, int elem_size) {
> 
> There should be no newline before the first brace.
> 
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the aarch64-port-dev mailing list