test/compiler/6875866/Test.java

Thu, 11 Apr 2013 09:39:57 -0700

author
katleman
date
Thu, 11 Apr 2013 09:39:57 -0700
changeset 4883
5dcfeb396fed
parent 1907
c18cbe5936b8
child 6876
710a3c8b516e
permissions
-rw-r--r--

Added tag jdk8-b85 for changeset 42fe530cd478

kvn@1421 1 /*
trims@1907 2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
kvn@1421 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
kvn@1421 4 *
kvn@1421 5 * This code is free software; you can redistribute it and/or modify it
kvn@1421 6 * under the terms of the GNU General Public License version 2 only, as
kvn@1421 7 * published by the Free Software Foundation.
kvn@1421 8 *
kvn@1421 9 * This code is distributed in the hope that it will be useful, but WITHOUT
kvn@1421 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
kvn@1421 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kvn@1421 12 * version 2 for more details (a copy is included in the LICENSE file that
kvn@1421 13 * accompanied this code).
kvn@1421 14 *
kvn@1421 15 * You should have received a copy of the GNU General Public License version
kvn@1421 16 * 2 along with this work; if not, write to the Free Software Foundation,
kvn@1421 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
kvn@1421 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
kvn@1421 22 */
kvn@1421 23
kvn@1421 24 /**
kvn@1421 25 * @test
kvn@1421 26 * @bug 6875866
kvn@1421 27 * @summary Intrinsic for String.indexOf() is broken on x86 with SSE4.2
kvn@1421 28 *
kvn@1421 29 * @run main/othervm -Xcomp Test
kvn@1421 30 */
kvn@1421 31
kvn@1421 32 public class Test {
kvn@1421 33
kvn@1421 34 static int IndexOfTest(String str) {
kvn@1421 35 return str.indexOf("11111xx1x");
kvn@1421 36 }
kvn@1421 37
kvn@1421 38 public static void main(String args[]) {
kvn@1421 39 String str = "11111xx11111xx1x";
kvn@1421 40 int idx = IndexOfTest(str);
kvn@1421 41 System.out.println("IndexOf = " + idx);
kvn@1421 42 if (idx != 7) {
kvn@1421 43 System.exit(97);
kvn@1421 44 }
kvn@1421 45 }
kvn@1421 46 }

mercurial