# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/openjdk/mips.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 --- [buildjdk] Creating interim jimage jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum constant jdk.internal.util.Architecture.MIPS at jdk.jlink/jdk.tools.jlink.builder.DefaultImageBuilder.storeFiles(DefaultImageBuilder.java:181) --- jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/Architecture.java.vanilla 2024-12-05 18:35:56.466491465 +0100 +++ jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/Architecture.java 2024-12-05 18:38:34.059823788 +0100 @@ -46,7 +46,9 @@ HPPA(32, ByteOrder.BIG_ENDIAN), LOONGARCH64(64, ByteOrder.LITTLE_ENDIAN), M68K(32, ByteOrder.BIG_ENDIAN), + MIPS(32, ByteOrder.BIG_ENDIAN), MIPSEL(32, ByteOrder.LITTLE_ENDIAN), + MIPS64(64, ByteOrder.BIG_ENDIAN), MIPS64EL(64, ByteOrder.LITTLE_ENDIAN), OTHER(is64bit() ? 64 : 32, ByteOrder.nativeOrder()), PPC(32, ByteOrder.BIG_ENDIAN), @@ -200,6 +202,14 @@ } /** + * {@return {@code true} if the current architecture is MIPS} + */ + @ForceInline + public static boolean isMIPS() { + return PlatformProps.TARGET_ARCH_IS_MIPS; + } + + /** * {@return {@code true} if the current architecture is MIPSEL} */ @ForceInline @@ -208,6 +218,14 @@ } /** + * {@return {@code true} if the current architecture is MIPS64} + */ + @ForceInline + public static boolean isMIPS64() { + return PlatformProps.TARGET_ARCH_IS_MIPS64; + } + + /** * {@return {@code true} if the current architecture is MIPS64EL} */ @ForceInline --- jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template.vanilla 2024-12-05 18:42:05.483155757 +0100 +++ jdk21u-jdk-21.0.3-ga/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template 2024-12-05 18:42:31.333155595 +0100 @@ -55,7 +55,9 @@ static final boolean TARGET_ARCH_IS_AARCH64 = "@@OPENJDK_TARGET_CPU@@" == "aarch64"; static final boolean TARGET_ARCH_IS_ARM = "@@OPENJDK_TARGET_CPU@@" == "arm"; static final boolean TARGET_ARCH_IS_LOONGARCH64 = "@@OPENJDK_TARGET_CPU@@" == "loongarch64"; + static final boolean TARGET_ARCH_IS_MIPS = "@@OPENJDK_TARGET_CPU@@" == "mips"; static final boolean TARGET_ARCH_IS_MIPSEL = "@@OPENJDK_TARGET_CPU@@" == "mipsel"; + static final boolean TARGET_ARCH_IS_MIPS64 = "@@OPENJDK_TARGET_CPU@@" == "mips64"; static final boolean TARGET_ARCH_IS_MIPS64EL= "@@OPENJDK_TARGET_CPU@@" == "mips64el"; static final boolean TARGET_ARCH_IS_PPC = "@@OPENJDK_TARGET_CPU@@" == "ppc"; static final boolean TARGET_ARCH_IS_PPC64 = "@@OPENJDK_TARGET_CPU@@" == "ppc64";