[aarch64-port-dev ] [10] RFR: 8187472 - AARCH64: array_equals intrinsic doesn't use prefetch for large arrays
Andrew Haley
aph at redhat.com
Wed Nov 15 12:16:40 UTC 2017
On 15/11/17 10:34, Andrew Haley wrote:
> Gosh. I think that's a very bad patch.
In fact it's even worse than I thought. It causes crashes in testing.
Nobody seems to have noticed that the .ad file is wrong.
Note this:
instruct string_equalsL(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
iRegI_R0 result, rFlagsReg cr)
instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
iRegP_R4 tmp, rFlagsReg cr)
Spot the difference? str2 is in R3, ary2 is in R2. That means you
can't call the same stub from both of these patterns.
If you're adding a stub call you must assert that the passed registers
are correct. Add the assertions, fix the register usage, and test it
properly, both with and without UseSIMDForArrayEquals.
--
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