# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/openjdk/sparc.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/Architecture.java.vanilla 2024-12-05 19:30:01.069803915 +0100 +++ jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/Architecture.java 2024-12-05 19:30:26.149803753 +0100 @@ -57,6 +57,7 @@ RISCV64(64, ByteOrder.LITTLE_ENDIAN), S390(64, ByteOrder.BIG_ENDIAN), SH(32, ByteOrder.LITTLE_ENDIAN), + SPARC(32, ByteOrder.BIG_ENDIAN), SPARCV9(64, ByteOrder.BIG_ENDIAN), X86(32, ByteOrder.LITTLE_ENDIAN), X64(64, ByteOrder.LITTLE_ENDIAN), // Represents AMD64 and X86_64 @@ -234,6 +235,14 @@ } /** + * {@return {@code true} if the current architecture is SPARCV9} + */ + @ForceInline + public static boolean isSPARC() { + return PlatformProps.TARGET_ARCH_IS_SPARC; + } + + /** * {@return {@code true} if the current architecture is SPARCV9} */ @ForceInline --- jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template.vanilla 2024-12-05 19:31:07.379803488 +0100 +++ jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template 2024-12-05 19:32:13.119803064 +0100 @@ -64,6 +64,7 @@ static final boolean TARGET_ARCH_IS_PPC64LE = "@@OPENJDK_TARGET_CPU@@" == "ppc64le"; static final boolean TARGET_ARCH_IS_RISCV64 = "@@OPENJDK_TARGET_CPU@@" == "riscv64"; static final boolean TARGET_ARCH_IS_S390 = "@@OPENJDK_TARGET_CPU@@" == "s390"; + static final boolean TARGET_ARCH_IS_SPARC = "@@OPENJDK_TARGET_CPU@@" == "sparcv8"; static final boolean TARGET_ARCH_IS_SPARCV9 = "@@OPENJDK_TARGET_CPU@@" == "sparcv9"; static final boolean TARGET_ARCH_IS_X86 = "@@OPENJDK_TARGET_CPU@@" == "x86"; static final boolean TARGET_ARCH_IS_X64 = "@@OPENJDK_TARGET_CPU@@" == "x64"; --- jdk21u-jdk-21.0.3-ga/make/autoconf/platform.m4.vanilla 2024-12-05 19:35:59.043134941 +0100 +++ jdk21u-jdk-21.0.3-ga/make/autoconf/platform.m4 2024-12-05 19:37:04.093134521 +0100 @@ -168,25 +168,13 @@ VAR_CPU_BITS=32 VAR_CPU_ENDIAN=little ;; - sparc) + sparcv*) VAR_CPU=sparc VAR_CPU_ARCH=sparc VAR_CPU_BITS=32 VAR_CPU_ENDIAN=big ;; - sparcv9|sparc64) - VAR_CPU=sparcv9 - VAR_CPU_ARCH=sparc - VAR_CPU_BITS=64 - VAR_CPU_ENDIAN=big - ;; - sparc) - VAR_CPU=sparc - VAR_CPU_ARCH=sparc - VAR_CPU_BITS=32 - VAR_CPU_ENDIAN=big - ;; - sparcv9|sparc64) + sparc64) VAR_CPU=sparcv9 VAR_CPU_ARCH=sparc VAR_CPU_BITS=64