mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-29 00:02:34 +00:00
8310105: LoongArch64 builds are broken after JDK-8304913
Reviewed-by: shade, rriggs
This commit is contained in:
parent
33c6ec9d4e
commit
137a5f7c2c
@ -39,6 +39,7 @@ public enum Architecture {
|
||||
AARCH64,
|
||||
ARM,
|
||||
RISCV64,
|
||||
LOONGARCH64,
|
||||
S390,
|
||||
PPC64,
|
||||
MIPSEL,
|
||||
@ -71,6 +72,14 @@ public enum Architecture {
|
||||
return PlatformProps.TARGET_ARCH_IS_RISCV64;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return {@code true} if the current architecture is LOONGARCH64}
|
||||
*/
|
||||
@ForceInline
|
||||
public static boolean isLOONGARCH64() {
|
||||
return PlatformProps.TARGET_ARCH_IS_LOONGARCH64;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return {@code true} if the current architecture is S390}
|
||||
*/
|
||||
|
||||
@ -55,6 +55,7 @@ class PlatformProps {
|
||||
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_RISCV64 = "@@OPENJDK_TARGET_CPU@@" == "riscv64";
|
||||
static final boolean TARGET_ARCH_IS_LOONGARCH64 = "@@OPENJDK_TARGET_CPU@@" == "loongarch64";
|
||||
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";
|
||||
|
||||
@ -31,6 +31,7 @@ import static jdk.internal.util.Architecture.AARCH64;
|
||||
import static jdk.internal.util.Architecture.ARM;
|
||||
import static jdk.internal.util.Architecture.PPC64;
|
||||
import static jdk.internal.util.Architecture.RISCV64;
|
||||
import static jdk.internal.util.Architecture.LOONGARCH64;
|
||||
import static jdk.internal.util.Architecture.S390;
|
||||
import static jdk.internal.util.Architecture.X64;
|
||||
import static jdk.internal.util.Architecture.X86;
|
||||
@ -72,6 +73,7 @@ public class ArchTest {
|
||||
case "aarch64" -> AARCH64;
|
||||
case "arm" -> ARM;
|
||||
case "riscv64" -> RISCV64;
|
||||
case "loongarch64" -> LOONGARCH64;
|
||||
case "s390x", "s390" -> S390;
|
||||
case "ppc64", "ppc64le" -> PPC64;
|
||||
case "mipsel" -> MIPSEL;
|
||||
@ -92,6 +94,7 @@ public class ArchTest {
|
||||
Arguments.of(AARCH64, Architecture.isAARCH64()),
|
||||
Arguments.of(ARM, Architecture.isARM()),
|
||||
Arguments.of(RISCV64, Architecture.isRISCV64()),
|
||||
Arguments.of(LOONGARCH64, Architecture.isLOONGARCH64()),
|
||||
Arguments.of(S390, Architecture.isS390()),
|
||||
Arguments.of(MIPSEL, Architecture.isMIPSEL()),
|
||||
Arguments.of(MIPS64EL, Architecture.isMIPS64EL()),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user