From 90bad7d65a762f76621733e8d8af672e57611505 Mon Sep 17 00:00:00 2001 From: guanqiang han Date: Mon, 7 Jul 2025 10:28:49 +0800 Subject: [PATCH] 8358592: Assert in Assembler::ptest due to missing SSE42 support Setting "-XX:UseSSE=1" in command line prevents the code from entering the block which causes UseSSE42Intrinsics to not be correctly set. --- src/hotspot/cpu/x86/vm_version_x86.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hotspot/cpu/x86/vm_version_x86.cpp b/src/hotspot/cpu/x86/vm_version_x86.cpp index e4a101a597734..81b7e159c9b36 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.cpp +++ b/src/hotspot/cpu/x86/vm_version_x86.cpp @@ -1491,6 +1491,8 @@ void VM_Version::get_processor_features() { } FLAG_SET_DEFAULT(UseSSE42Intrinsics, false); } + }else{ + FLAG_SET_DEFAULT(UseSSE42Intrinsics, false); } if (FLAG_IS_DEFAULT(AllocatePrefetchInstr) && supports_3dnow_prefetch()) { @@ -1643,6 +1645,8 @@ void VM_Version::get_processor_features() { } FLAG_SET_DEFAULT(UseSSE42Intrinsics, false); } + }else{ + FLAG_SET_DEFAULT(UseSSE42Intrinsics, false); } if (is_atom_family() || is_knights_family()) { #ifdef COMPILER2