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

Andrew Haley aph at redhat.com
Wed Jun 20 08:57:33 UTC 2018


On 06/20/2018 09:26 AM, Joshua Zhu wrote:
> http://hg.openjdk.java.net/jdk/jdk/file/e810abb27deb/src/hotspot/cpu/aarch64/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