From 0deceee37d943faa7c34971388863a27f395d6a5 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 30 Jan 2015 21:15:45 +0100 Subject: Bug 1122: Refine AArch64 and OSType/32Bit incl. MachineDescription Android: - Detect ABIType.EABI_GNU_ARMHF via 'armeabi-v7a-hard' Platform.CPUType: - contains is32Bit now MachineDescription: - Rename *x86_64_unix* -> *lp64_unix*, reflecting universal __LP64__ mode - Remove is32Bit, which is determined by CPUType --- .../common/os/MachineDescriptionRuntime.java | 32 ++++------------------ 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'src/java/jogamp/common/os/MachineDescriptionRuntime.java') diff --git a/src/java/jogamp/common/os/MachineDescriptionRuntime.java b/src/java/jogamp/common/os/MachineDescriptionRuntime.java index c45aeb7..8df29f6 100644 --- a/src/java/jogamp/common/os/MachineDescriptionRuntime.java +++ b/src/java/jogamp/common/os/MachineDescriptionRuntime.java @@ -71,30 +71,8 @@ public class MachineDescriptionRuntime { } } - private static boolean isCPUArch32Bit(final Platform.CPUType cpuType) throws RuntimeException { - switch( cpuType ) { - case X86_32: - case ARM: - case ARMv5: - case ARMv6: - case ARMv7: - case SPARC_32: - case PPC: - return true; - case X86_64: - case ARM64: - case ARMv8_A: - case IA64: - case SPARCV9_64: - case PA_RISC2_0: - return false; - default: - throw new RuntimeException("Please port CPU detection (32/64 bit) to your platform (" + PlatformPropsImpl.OS_lower + "/" + PlatformPropsImpl.ARCH_lower + "("+PlatformPropsImpl.CPU_ARCH+"))"); - } - } - private static MachineDescription.StaticConfig get(final Platform.OSType osType, final Platform.CPUType cpuType, final boolean littleEndian) { - if( isCPUArch32Bit(cpuType) ) { + if( cpuType.is32Bit ) { if( cpuType.getFamily() == Platform.CPUFamily.ARM && littleEndian) { return StaticConfig.ARMle_EABI; } else if( osType == Platform.OSType.WINDOWS ) { @@ -109,12 +87,12 @@ public class MachineDescriptionRuntime { } return StaticConfig.X86_32_UNIX; } else { - if( cpuType.getFamily() == Platform.CPUFamily.ARM && littleEndian) { - return StaticConfig.X86_64_UNIX; - } else if( osType == Platform.OSType.WINDOWS ) { + if( osType == Platform.OSType.WINDOWS ) { return StaticConfig.X86_64_WINDOWS; + } else { + // for all 64bit unix types (x86_64, aarch64, ..) + return StaticConfig.LP64_UNIX; } - return StaticConfig.X86_64_UNIX; } } -- cgit v1.2.3