8308270: ARM32 build broken after JDK-8304913
Reviewed-by: stuefe, rriggs
This commit is contained in:
parent
902585bec1
commit
83c096d6e2
@ -37,6 +37,7 @@ public enum Architecture {
|
||||
X64, // Represents AMD64 and X86_64
|
||||
X86,
|
||||
AARCH64,
|
||||
ARM,
|
||||
RISCV64,
|
||||
S390,
|
||||
PPC64,
|
||||
@ -85,6 +86,14 @@ public enum Architecture {
|
||||
return PlatformProps.TARGET_ARCH_IS_PPC64;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return {@code true} if the current architecture is ARM}
|
||||
*/
|
||||
@ForceInline
|
||||
public static boolean isARM() {
|
||||
return PlatformProps.TARGET_ARCH_IS_ARM;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return {@code true} if the current architecture is AARCH64}
|
||||
*/
|
||||
|
@ -53,6 +53,7 @@ class PlatformProps {
|
||||
static final boolean TARGET_ARCH_IS_X64 = "@@OPENJDK_TARGET_CPU@@" == "x64";
|
||||
static final boolean TARGET_ARCH_IS_X86 = "@@OPENJDK_TARGET_CPU@@" == "x86";
|
||||
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_S390 = "@@OPENJDK_TARGET_CPU@@" == "s390";
|
||||
static final boolean TARGET_ARCH_IS_PPC64 = "@@OPENJDK_TARGET_CPU@@" == "ppc64";
|
||||
|
@ -28,6 +28,7 @@ import jdk.internal.misc.Unsafe;
|
||||
|
||||
import static jdk.internal.util.Architecture.OTHER;
|
||||
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.S390;
|
||||
@ -67,6 +68,7 @@ public class ArchTest {
|
||||
case "x86_64", "amd64" -> X64;
|
||||
case "x86", "i386" -> X86;
|
||||
case "aarch64" -> AARCH64;
|
||||
case "arm" -> ARM;
|
||||
case "riscv64" -> RISCV64;
|
||||
case "s390x", "s390" -> S390;
|
||||
case "ppc64", "ppc64le" -> PPC64;
|
||||
@ -84,6 +86,7 @@ public class ArchTest {
|
||||
Arguments.of(X64, Architecture.isX64()),
|
||||
Arguments.of(X86, Architecture.isX86()),
|
||||
Arguments.of(AARCH64, Architecture.isAARCH64()),
|
||||
Arguments.of(ARM, Architecture.isARM()),
|
||||
Arguments.of(RISCV64, Architecture.isRISCV64()),
|
||||
Arguments.of(S390, Architecture.isS390()),
|
||||
Arguments.of(PPC64, Architecture.isPPC64())
|
||||
|
Loading…
Reference in New Issue
Block a user