8315579: SPARC64 builds are broken after JDK-8304913
Reviewed-by: rriggs, phh
This commit is contained in:
parent
f6c203e616
commit
cfc148930b
@ -52,7 +52,8 @@ public enum Architecture {
|
||||
PPC64(64, ByteOrder.BIG_ENDIAN),
|
||||
PPC64LE(64, ByteOrder.LITTLE_ENDIAN),
|
||||
MIPSEL(32, ByteOrder.LITTLE_ENDIAN),
|
||||
MIPS64EL(64, ByteOrder.LITTLE_ENDIAN)
|
||||
MIPS64EL(64, ByteOrder.LITTLE_ENDIAN),
|
||||
SPARCV9(64, ByteOrder.BIG_ENDIAN),
|
||||
;
|
||||
|
||||
private final int addrSize;
|
||||
@ -202,6 +203,14 @@ public enum Architecture {
|
||||
return PlatformProps.TARGET_ARCH_IS_MIPS64EL;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return {@code true} if the current architecture is SPARCV9}
|
||||
*/
|
||||
@ForceInline
|
||||
public static boolean isSPARCV9() {
|
||||
return PlatformProps.TARGET_ARCH_IS_SPARCV9;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return the current architecture}
|
||||
*/
|
||||
|
@ -63,4 +63,5 @@ class PlatformProps {
|
||||
static final boolean TARGET_ARCH_IS_PPC64LE = "@@OPENJDK_TARGET_CPU@@" == "ppc64le";
|
||||
static final boolean TARGET_ARCH_IS_MIPSEL = "@@OPENJDK_TARGET_CPU@@" == "mipsel";
|
||||
static final boolean TARGET_ARCH_IS_MIPS64EL= "@@OPENJDK_TARGET_CPU@@" == "mips64el";
|
||||
static final boolean TARGET_ARCH_IS_SPARCV9 = "@@OPENJDK_TARGET_CPU@@" == "sparcv9";
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import static jdk.internal.util.Architecture.X64;
|
||||
import static jdk.internal.util.Architecture.X86;
|
||||
import static jdk.internal.util.Architecture.MIPSEL;
|
||||
import static jdk.internal.util.Architecture.MIPS64EL;
|
||||
import static jdk.internal.util.Architecture.SPARCV9;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
@ -85,6 +86,7 @@ public class ArchTest {
|
||||
Arguments.of("riscv64", RISCV64, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isRISCV64()),
|
||||
Arguments.of("s390", S390, 64, ByteOrder.BIG_ENDIAN, Architecture.isS390()),
|
||||
Arguments.of("s390x", S390, 64, ByteOrder.BIG_ENDIAN, Architecture.isS390()),
|
||||
Arguments.of("sparcv9", SPARCV9, 64, ByteOrder.BIG_ENDIAN, Architecture.isSPARCV9()),
|
||||
Arguments.of("x64", X64, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isX64()),
|
||||
Arguments.of("x86", X86, 32, ByteOrder.LITTLE_ENDIAN, Architecture.isX86()),
|
||||
Arguments.of("x86_64", X64, 64, ByteOrder.LITTLE_ENDIAN, Architecture.isX64())
|
||||
|
Loading…
Reference in New Issue
Block a user