--- old/src/cpu/x86/vm/vm_version_x86.cpp 2016-05-31 14:01:15.920558450 +0200 +++ new/src/cpu/x86/vm/vm_version_x86.cpp 2016-05-31 14:01:15.852558448 +0200 @@ -658,7 +658,7 @@ FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false); } } else { - if(supports_sse4_1() && UseSSE >= 4) { + if(supports_sse4_1()) { if (FLAG_IS_DEFAULT(UseAESCTRIntrinsics)) { FLAG_SET_DEFAULT(UseAESCTRIntrinsics, true); } @@ -699,13 +699,13 @@ FLAG_SET_DEFAULT(UseCLMUL, false); } - if (UseCLMUL && (UseSSE > 2)) { + if (UseCLMUL && supports_sse4_1()) { if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) { UseCRC32Intrinsics = true; } } else if (UseCRC32Intrinsics) { if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) - warning("CRC32 Intrinsics requires CLMUL instructions (not available on this CPU)"); + warning("CRC32 intrinsics are not available on this CPU"); FLAG_SET_DEFAULT(UseCRC32Intrinsics, false); } @@ -970,7 +970,7 @@ UseXmmI2D = false; } } - if (supports_sse4_2() && UseSSE >= 4) { + if (supports_sse4_2()) { if (FLAG_IS_DEFAULT(UseSSE42Intrinsics)) { FLAG_SET_DEFAULT(UseSSE42Intrinsics, true); } @@ -1050,7 +1050,7 @@ UseUnalignedLoadStores = true; // use movdqu on newest Intel cpus } } - if (supports_sse4_2() && UseSSE >= 4) { + if (supports_sse4_2()) { if (FLAG_IS_DEFAULT(UseSSE42Intrinsics)) { FLAG_SET_DEFAULT(UseSSE42Intrinsics, true); } --- /dev/null 2016-05-31 07:53:23.918486015 +0200 +++ new/test/compiler/cpuflags/TestSSE4Disabled.java 2016-05-31 14:01:16.112558456 +0200 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test TestSSE4Disabled + * @bug 8158214 + * @requires (os.simpleArch == "x64") + * @summary Test correct execution without SSE 4. + * @run main/othervm -Xcomp -XX:UseSSE=3 TestSSE4Disabled + */ +public class TestSSE4Disabled { + public static void main(String args[]) { + System.out.println("Passed"); + } +} +