RFR: 8143219: AArch64 broken by 8141132: JEP 254: Compact Strings

Andrew Haley aph at redhat.com
Thu Nov 19 15:13:38 UTC 2015


On 11/19/2015 03:08 PM, Tobias Hartmann wrote:

> On 19.11.2015 12:56, Andrew Haley wrote:
>> http://cr.openjdk.java.net/~aph/8143219/
>> Two things happened, one simple and one not-so-simple.
>> Firstly, the string comparators now take a byte count (because it's a
>> byte array now) rather than a char count.
> Looks good.
>> Secondly, string_indexOf needs to have a guard to make sure that
>> substr.count <= string.count.  This is guaranteed by
>> LibraryCallKit::inline_string_indexOf but not by
>> LibraryCallKit::inline_string_indexOfI.  This is a subtle change, and
>> was quite tricky to figure out.  I have fixed it here in the AArch64
>> back end.
> I think this check should be done in inline_string_indexOfI()
> because other intrinsics may also depend on it (see
> macroAssembler_x86.cpp). Same applies to the "substr count == 0"
> check. One could probably factor out the checks and use them for
> both inline_string_indexOf* methods.
> I'm moving some more runtime checks from the Java code into the
> intrinsics (see JDK-8142303 which is currently out for review on
> hotspot-compiler-dev).
> If you want, I can take care of these checks as well.

OK, that would be cool.  In the meantime it's a bit difficult for
AArch64 because nothing works without these fixes.  I wonder if I
should push this workaround and back it out later.


More information about the hotspot-dev mailing list