[9] RFR(S): 8144693: Intrinsify StringCoding.hasNegatives() on SPARC

Guy Delamarter Guy.Delamarter at oracle.com
Wed Mar 2 23:33:42 UTC 2016


Please review the following patch adding a SPARC intrinsic for
StringCoding.hasNegatives to hotspot and supporting changes.

Tobias Hartmann (tobias.hartmann at oracle.com) has offered to
sponsor these changes.


hasNegatives is a utility method for encoding/decoding under the new
Compact Strings framework, returning whether the given byte array
(segment) contains any negative entries.  hasNegatives is an intrinsic
candidate, emitted by hotspot as a node in the latest Java 9 builds,
but the SPARC node match and (inline assembly) implementation have
been missing up to now.  This implementation checks aligned 8-byte
windows onto the array segment for negative bytes, carefully ignoring
bytes in the window that happen to be outside the segment.
It was discovered that the private access of the hasNegatives method
prevented direct testing of the intrinsic from outside StringCoding,
so that was changed to public.  Subsequent to this change a compiler
test class (TestHasNegatives) was added providing useful validation



Guy Delamarter

More information about the hotspot-dev mailing list