Skip to content


8310105: LoongArch64 builds are broken after JDK-8304913
Browse files Browse the repository at this point in the history
Reviewed-by: shade, rriggs
  • Loading branch information
theaoqi authored and shipilev committed Jun 19, 2023
1 parent 33c6ec9 commit 137a5f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public enum Architecture {
Expand Down Expand Up @@ -71,6 +72,14 @@ public static boolean isRISCV64() {
return PlatformProps.TARGET_ARCH_IS_RISCV64;

* {@return {@code true} if the current architecture is LOONGARCH64}
public static boolean isLOONGARCH64() {
return PlatformProps.TARGET_ARCH_IS_LOONGARCH64;

* {@return {@code true} if the current architecture is S390}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
3 changes: 3 additions & 0 deletions test/jdk/jdk/internal/util/
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
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;
Expand Down Expand Up @@ -72,6 +73,7 @@ public void nameVsCurrent() {
case "aarch64" -> AARCH64;
case "arm" -> ARM;
case "riscv64" -> RISCV64;
case "loongarch64" -> LOONGARCH64;
case "s390x", "s390" -> S390;
case "ppc64", "ppc64le" -> PPC64;
case "mipsel" -> MIPSEL;
Expand All @@ -92,6 +94,7 @@ private static Stream<Arguments> archParams() {
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()),
Expand Down

1 comment on commit 137a5f7

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.