[10] RFR(S): JDK-8184943: AARCH64: Intrinsify hasNegatives

Andrew Haley aph at redhat.com
Fri Jul 21 08:22:15 UTC 2017


On 20/07/17 19:27, Dmitrij Pochepko wrote:
> Btw: I've also considered such unconditional 8-bytes load at start, but 
> abandoned this idea since I wasn't sure if it's safe. Say, array is 
> allocated at the border of allocated region(so, last array byte == last 
> allocated region byte). Then hasNegatives is called with offset == 
> array_length - 1 and len = 1 just to check last byte, so, then 8-byte 
> load is issued at this address?

It's certainly possible.  We can't read an address beyond our byte
array if there is any possibility that we're at the end of a page,
because we might hit a segfault.  We could test for that.

-- 
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 hotspot-compiler-dev mailing list