--- old/src/hotspot/cpu/ppc/vm_version_ppc.cpp 2018-04-05 20:10:05.660007260 +0530 +++ new/src/hotspot/cpu/ppc/vm_version_ppc.cpp 2018-04-05 20:10:05.372007248 +0530 @@ -159,8 +159,6 @@ _supports_atomic_getset8 = true; _supports_atomic_getadd8 = true; - UseSSE = 0; // Only on x86 and x64 - intx cache_line_size = L1_data_cache_line_size(); if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) AllocatePrefetchStyle = 1; --- old/src/hotspot/cpu/sparc/vm_version_sparc.cpp 2018-04-05 20:10:06.192007284 +0530 +++ new/src/hotspot/cpu/sparc/vm_version_sparc.cpp 2018-04-05 20:10:05.888007270 +0530 @@ -67,8 +67,6 @@ } } - UseSSE = false; // Only used on x86 and x64. - _supports_cx8 = true; // All SPARC V9 implementations. _supports_atomic_getset4 = true; // Using the 'swap' instruction. --- old/src/hotspot/cpu/x86/globals_x86.hpp 2018-04-05 20:10:06.672007305 +0530 +++ new/src/hotspot/cpu/x86/globals_x86.hpp 2018-04-05 20:10:06.420007294 +0530 @@ -123,6 +123,10 @@ "Highest supported AVX instructions set on x86/x64") \ range(0, 99) \ \ + product(intx, UseSSE, 99, \ + "Highest supported SSE instructions set on x86/x64") \ + range(0, 99) \ + \ product(bool, UseCLMUL, false, \ "Control whether CLMUL instructions can be used on x86/x64") \ \ --- old/src/hotspot/share/c1/c1_GraphBuilder.cpp 2018-04-05 20:10:07.196007329 +0530 +++ new/src/hotspot/share/c1/c1_GraphBuilder.cpp 2018-04-05 20:10:06.908007316 +0530 @@ -606,7 +606,7 @@ return load; } - if (RoundFPResults && UseSSE < 2 && load->type()->is_float_kind()) { + if (RoundFPResults X86_ONLY(&& UseSSE < 2) && load->type()->is_float_kind()) { // can't skip load since value might get rounded as a side effect return load; } @@ -2265,7 +2265,7 @@ Value GraphBuilder::round_fp(Value fp_value) { // no rounding needed if SSE2 is used - if (RoundFPResults && UseSSE < 2) { + if (RoundFPResults X86_ONLY(&& UseSSE < 2)) { // Must currently insert rounding node for doubleword values that // are results of expressions (i.e., not loads from memory or // constants) @@ -3764,7 +3764,7 @@ // When SSE2 is used on intel, then no special handling is needed // for strictfp because the enum-constant is fixed at compile time, // the check for UseSSE2 is needed here - if (strict_fp_requires_explicit_rounding && UseSSE < 2 && method()->is_strict() != callee->is_strict()) { + if (strict_fp_requires_explicit_rounding X86_ONLY(&& UseSSE < 2) && method()->is_strict() != callee->is_strict()) { INLINE_BAILOUT("caller and callee have different strict fp requirements"); } --- old/src/hotspot/share/c1/c1_LIRGenerator.cpp 2018-04-05 20:10:07.704007351 +0530 +++ new/src/hotspot/share/c1/c1_LIRGenerator.cpp 2018-04-05 20:10:07.456007340 +0530 @@ -915,7 +915,7 @@ LIR_Opr LIRGenerator::round_item(LIR_Opr opr) { assert(opr->is_register(), "why spill if item is not register?"); - if (RoundFPResults && UseSSE < 1 && opr->is_single_fpu()) { + if (RoundFPResults X86_ONLY(&& UseSSE) < 1 && opr->is_single_fpu()) { LIR_Opr result = new_register(T_FLOAT); set_vreg_flag(result, must_start_in_memory); assert(opr->is_register(), "only a register can be spilled"); --- old/src/hotspot/share/c1/c1_LinearScan.cpp 2018-04-05 20:10:08.200007373 +0530 +++ new/src/hotspot/share/c1/c1_LinearScan.cpp 2018-04-05 20:10:07.948007362 +0530 @@ -1088,7 +1088,9 @@ // this operand is allowed to be on the stack in some cases BasicType opr_type = opr->type_register(); if (opr_type == T_FLOAT || opr_type == T_DOUBLE) { - if ((UseSSE == 1 && opr_type == T_FLOAT) || UseSSE >= 2 S390_ONLY(|| true)) { +#ifdef X86 + if ((UseSSE == 1 && opr_type == T_FLOAT) || UseSSE >= 2) { +#endif // SSE float instruction (T_DOUBLE only supported with SSE2) switch (op->code()) { case lir_cmp: @@ -1107,6 +1109,7 @@ default: break; } +#ifdef X86 } else { // FPU stack float instruction switch (op->code()) { @@ -1126,6 +1129,7 @@ break; } } +#endif // We want to sometimes use logical operations on pointers, in particular in GC barriers. // Since 64bit logical operations do not current support operands on stack, we have to make sure // T_OBJECT doesn't get spilled along with T_LONG. --- old/src/hotspot/share/compiler/compileBroker.cpp 2018-04-05 20:10:08.724007396 +0530 +++ new/src/hotspot/share/compiler/compileBroker.cpp 2018-04-05 20:10:08.472007385 +0530 @@ -1147,6 +1147,7 @@ // if the version of the methods from the native libraries is called. // As the interpreter and the C2-intrinsified version of the methods preserves // sNaNs, that would result in an inconsistent way of handling of sNaNs. +#ifdef X86 if ((UseSSE >= 1 && (method->intrinsic_id() == vmIntrinsics::_intBitsToFloat || method->intrinsic_id() == vmIntrinsics::_floatToRawIntBits)) || @@ -1155,7 +1156,8 @@ method->intrinsic_id() == vmIntrinsics::_doubleToRawLongBits))) { return NULL; } - +#endif + // To properly handle the appendix argument for out-of-line calls we are using a small trampoline that // pops off the appendix argument and jumps to the target (see gen_special_dispatch in SharedRuntime). // --- old/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp 2018-04-05 20:10:09.452007429 +0530 +++ new/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp 2018-04-05 20:10:09.160007416 +0530 @@ -244,7 +244,7 @@ do_bool_flag(UseSHA1Intrinsics) \ do_bool_flag(UseSHA256Intrinsics) \ do_bool_flag(UseSHA512Intrinsics) \ - do_intx_flag(UseSSE) \ + X86_ONLY(do_intx_flag(UseSSE)) \ COMPILER2_PRESENT(do_bool_flag(UseSquareToLenIntrinsic)) \ do_bool_flag(UseStackBanging) \ do_bool_flag(UseTLAB) \ --- old/src/hotspot/share/opto/compile.cpp 2018-04-05 20:10:10.144007459 +0530 +++ new/src/hotspot/share/opto/compile.cpp 2018-04-05 20:10:09.880007448 +0530 @@ -3584,7 +3584,7 @@ // If original bytecodes contained a mixture of floats and doubles // check if the optimizer has made it homogenous, item (3). - if( Use24BitFPMode && Use24BitFP && UseSSE == 0 && + if( Use24BitFPMode && Use24BitFP X86_ONLY(&& UseSSE == 0) && frc.get_float_count() > 32 && frc.get_double_count() == 0 && (10 * frc.get_call_count() < frc.get_float_count()) ) { --- old/src/hotspot/share/opto/graphKit.cpp 2018-04-05 20:10:10.684007483 +0530 +++ new/src/hotspot/share/opto/graphKit.cpp 2018-04-05 20:10:10.416007471 +0530 @@ -2305,7 +2305,7 @@ // rounding for strict float precision conformance Node* GraphKit::precision_rounding(Node* n) { return UseStrictFP && _method->flags().is_strict() - && UseSSE == 0 && Matcher::strict_fp_requires_explicit_rounding + X86_ONLY(&& UseSSE == 0) && Matcher::strict_fp_requires_explicit_rounding ? _gvn.transform( new RoundFloatNode(0, n) ) : n; } @@ -2313,7 +2313,7 @@ // rounding for strict double precision conformance Node* GraphKit::dprecision_rounding(Node *n) { return UseStrictFP && _method->flags().is_strict() - && UseSSE <= 1 && Matcher::strict_fp_requires_explicit_rounding + X86_ONLY(&& UseSSE <= 1) && Matcher::strict_fp_requires_explicit_rounding ? _gvn.transform( new RoundDoubleNode(0, n) ) : n; } @@ -2321,7 +2321,7 @@ // rounding for non-strict double stores Node* GraphKit::dstore_rounding(Node* n) { return Matcher::strict_fp_requires_explicit_rounding - && UseSSE <= 1 + X86_ONLY(&& UseSSE <= 1) ? _gvn.transform( new RoundDoubleNode(0, n) ) : n; } --- old/src/hotspot/share/opto/library_call.cpp 2018-04-05 20:10:11.188007506 +0530 +++ new/src/hotspot/share/opto/library_call.cpp 2018-04-05 20:10:10.936007494 +0530 @@ -1727,7 +1727,7 @@ //--------------------------round_double_node-------------------------------- // Round a double node if necessary. Node* LibraryCallKit::round_double_node(Node* n) { - if (Matcher::strict_fp_requires_explicit_rounding && UseSSE <= 1) + if (Matcher::strict_fp_requires_explicit_rounding X86_ONLY(&& UseSSE <= 1)) n = _gvn.transform(new RoundDoubleNode(0, n)); return n; } --- old/src/hotspot/share/runtime/globals.hpp 2018-04-05 20:10:11.916007538 +0530 +++ new/src/hotspot/share/runtime/globals.hpp 2018-04-05 20:10:11.660007527 +0530 @@ -671,10 +671,6 @@ product_pd(bool, NeedsDeoptSuspend, \ "True for register window machines (sparc/ia64)") \ \ - product(intx, UseSSE, 99, \ - "Highest supported SSE instructions set on x86/x64") \ - range(0, 99) \ - \ product(bool, UseAES, false, \ "Control whether AES instructions are used when available") \ \ --- old/test/hotspot/jtreg/compiler/c1/Test6579789.java 2018-04-05 20:10:12.640007570 +0530 +++ new/test/hotspot/jtreg/compiler/c1/Test6579789.java 2018-04-05 20:10:12.372007558 +0530 @@ -25,6 +25,7 @@ * @test * @bug 6579789 * @summary Internal error "c1_LinearScan.cpp:1429 Error: assert(false,"")" in debuggee with fastdebug VM + * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" * * @run main/othervm -Xcomp -XX:UseSSE=0 * -XX:CompileCommand=compileonly,compiler.c1.Test6579789::bug --- old/test/hotspot/jtreg/compiler/c1/Test6855215.java 2018-04-05 20:10:13.112007591 +0530 +++ new/test/hotspot/jtreg/compiler/c1/Test6855215.java 2018-04-05 20:10:12.864007580 +0530 @@ -25,6 +25,7 @@ * @test * @bug 6855215 * @summary Calculation error (NaN) after about 1500 calculations + * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" * * @run main/othervm -Xbatch -XX:UseSSE=0 compiler.c1.Test6855215 */