Skip to content


8315578: PPC builds are broken after JDK-8304913
Browse files Browse the repository at this point in the history
Reviewed-by: mdoerr, rriggs
  • Loading branch information
shipilev committed Sep 8, 2023
1 parent e409d07 commit 9559e03
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public enum Architecture {
S390(64, ByteOrder.BIG_ENDIAN),
PPC(32, ByteOrder.BIG_ENDIAN),
PPC64(64, ByteOrder.BIG_ENDIAN),
Expand Down Expand Up @@ -155,6 +156,14 @@ public static boolean isS390() {
return PlatformProps.TARGET_ARCH_IS_S390;

* {@return {@code true} if the current architecture is PPC, big-endian}
public static boolean isPPC() {
return PlatformProps.TARGET_ARCH_IS_PPC;

* {@return {@code true} if the current architecture is PPC64, big-endian}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class PlatformProps {
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_PPC = "@@OPENJDK_TARGET_CPU@@" == "ppc";
static final boolean TARGET_ARCH_IS_PPC64 = "@@OPENJDK_TARGET_CPU@@" == "ppc64";
static final boolean TARGET_ARCH_IS_PPC64LE = "@@OPENJDK_TARGET_CPU@@" == "ppc64le";
static final boolean TARGET_ARCH_IS_MIPSEL = "@@OPENJDK_TARGET_CPU@@" == "mipsel";
Expand Down
2 changes: 2 additions & 0 deletions test/jdk/jdk/internal/util/
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import static jdk.internal.util.Architecture.AARCH64;
import static jdk.internal.util.Architecture.ARM;
import static jdk.internal.util.Architecture.PPC;
import static jdk.internal.util.Architecture.PPC64;
import static jdk.internal.util.Architecture.PPC64LE;
import static jdk.internal.util.Architecture.RISCV64;
Expand Down Expand Up @@ -81,6 +82,7 @@ private static Stream<Arguments> archParams() {
Arguments.of("loongarch64", LOONGARCH64, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isLOONGARCH64()),
Arguments.of("mips64el", MIPS64EL, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isMIPS64EL()),
Arguments.of("mipsel", MIPSEL, 32, ByteOrder.LITTLE_ENDIAN, Architecture.isMIPSEL()),
Arguments.of("ppc", PPC, 32, ByteOrder.BIG_ENDIAN, Architecture.isPPC()),
Arguments.of("ppc64", PPC64, 64, ByteOrder.BIG_ENDIAN, Architecture.isPPC64()),
Arguments.of("ppc64le", PPC64LE, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isPPC64LE()),
Arguments.of("riscv64", RISCV64, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isRISCV64()),
Expand Down

1 comment on commit 9559e03

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.