8144693: Intrinsify StringCoding.hasNegatives() on SPARC

Implemented C2 instrinsic for StringCode.hasNegatives() on SPARC.

Reviewed-by: kvn, jrose, thartmann
This commit is contained in:
Guy Delamarter 2016-03-21 08:42:00 +01:00 committed by Tobias Hartmann
parent 608a566d08
commit 38f31bbade

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -146,7 +146,7 @@ class StringCoding {
} }
@HotSpotIntrinsicCandidate @HotSpotIntrinsicCandidate
private static boolean hasNegatives(byte[] ba, int off, int len) { public static boolean hasNegatives(byte[] ba, int off, int len) {
for (int i = off; i < off + len; i++) { for (int i = off; i < off + len; i++) {
if (ba[i] < 0) { if (ba[i] < 0) {
return true; return true;