diff --git a/make/modules/java.base/Lib.gmk b/make/modules/java.base/Lib.gmk index 57f98707cb7bc..6d63795f6de63 100644 --- a/make/modules/java.base/Lib.gmk +++ b/make/modules/java.base/Lib.gmk @@ -227,7 +227,7 @@ ifeq ($(ENABLE_FALLBACK_LINKER), true) NAME := fallbackLinker, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBFFI_CFLAGS), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ - $(call SET_SHARED_LIBRARY_ORIGIN), \ + $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBFFI_LIBS), \ LIBS_windows := $(LIBFFI_LIBS) ws2_32.lib, \ )) diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp index 79ebef8b58113..e071583b10ba7 100644 --- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp +++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp @@ -4173,7 +4173,7 @@ void StubGenerator::generate_compiler_stubs() { } // Load x86_64_sort library on supported hardware to enable avx512 sort and partition intrinsics - if (UseAVX > 2 && VM_Version::supports_avx512dq()) { + if (VM_Version::is_intel() && VM_Version::supports_avx512dq()) { void *libsimdsort = nullptr; char ebuf_[1024]; char dll_name_simd_sort[JVM_MAXPATHLEN]; diff --git a/src/java.base/linux/native/libsimdsort/avx512-common-qsort.h b/src/java.base/linux/native/libsimdsort/avx512-common-qsort.h index b008bcd54b80c..7e1c1e31a3152 100644 --- a/src/java.base/linux/native/libsimdsort/avx512-common-qsort.h +++ b/src/java.base/linux/native/libsimdsort/avx512-common-qsort.h @@ -57,9 +57,18 @@ #include #include #include -#include #include +/* +Workaround for the bug in GCC12 (that was fixed in GCC 12.3.1). +More details are available at: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593 +*/ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#pragma GCC diagnostic ignored "-Wuninitialized" +#include +#pragma GCC diagnostic pop + #define X86_SIMD_SORT_INFINITY std::numeric_limits::infinity() #define X86_SIMD_SORT_INFINITYF std::numeric_limits::infinity() #define X86_SIMD_SORT_INFINITYH 0x7c00 diff --git a/src/java.base/share/classes/java/util/DualPivotQuicksort.java b/src/java.base/share/classes/java/util/DualPivotQuicksort.java index 0dd4b6e354aed..306113fbbeb87 100644 --- a/src/java.base/share/classes/java/util/DualPivotQuicksort.java +++ b/src/java.base/share/classes/java/util/DualPivotQuicksort.java @@ -166,9 +166,9 @@ interface PartitionOperation { /** * Partitions the specified range of the array using the given pivots. * - * @param a the array to be sorted - * @param low the index of the first element, inclusive, to be sorted - * @param high the index of the last element, exclusive, to be sorted + * @param a the array to be partitioned + * @param low the index of the first element, inclusive, to be partitioned + * @param high the index of the last element, exclusive, to be partitioned * @param pivotIndex1 the index of pivot1, the first pivot * @param pivotIndex2 the index of pivot2, the second pivot */ @@ -178,13 +178,13 @@ interface PartitionOperation { /** * Partitions the specified range of the array using the two pivots provided. * - * @param elemType the class of the array to be sorted - * @param array the array to be sorted + * @param elemType the class of the array to be partitioned + * @param array the array to be partitioned * @param offset the relative offset, in bytes, from the base address of * the array to partition, otherwise if the array is {@code null},an absolute * address pointing to the first element to partition from. - * @param low the index of the first element, inclusive, to be sorted - * @param high the index of the last element, exclusive, to be sorted + * @param low the index of the first element, inclusive, to be partitioned + * @param high the index of the last element, exclusive, to be partitioned * @param pivotIndex1 the index of pivot1, the first pivot * @param pivotIndex2 the index of pivot2, the second pivot * @param po the method reference for the fallback implementation