8310019: MIPS builds are broken after JDK-8304913

Reviewed-by: phh, shade, aoqi
This commit is contained in:
Roger Riggs 2023-06-19 18:29:14 +00:00
parent e08e94f1b9
commit 33c6ec9d4e
3 changed files with 26 additions and 0 deletions

View file

@ -41,6 +41,8 @@ public enum Architecture {
RISCV64,
S390,
PPC64,
MIPSEL,
MIPS64EL
;
private static Architecture CURRENT_ARCH = initArch(PlatformProps.CURRENT_ARCH_STRING);
@ -102,6 +104,22 @@ public enum Architecture {
return PlatformProps.TARGET_ARCH_IS_AARCH64;
}
/**
* {@return {@code true} if the current architecture is MIPSEL}
*/
@ForceInline
public static boolean isMIPSEL() {
return PlatformProps.TARGET_ARCH_IS_MIPSEL;
}
/**
* {@return {@code true} if the current architecture is MIPS64EL}
*/
@ForceInline
public static boolean isMIPS64EL() {
return PlatformProps.TARGET_ARCH_IS_MIPS64EL;
}
/**
* {@return the current architecture}
*/

View file

@ -57,4 +57,6 @@ class PlatformProps {
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_PPC64 = "@@OPENJDK_TARGET_CPU@@" == "ppc64";
static final boolean TARGET_ARCH_IS_MIPSEL = "@@OPENJDK_TARGET_CPU@@" == "mipsel";
static final boolean TARGET_ARCH_IS_MIPS64EL= "@@OPENJDK_TARGET_CPU@@" == "mips64el";
}