summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-30 21:15:45 +0100
committerSven Gothel <[email protected]>2015-01-30 21:15:45 +0100
commit0deceee37d943faa7c34971388863a27f395d6a5 (patch)
tree8bbdba69305671c6764b4796d022f9c5e6c49c43 /src/java/jogamp/common
parent12feaa7d3b1544098f684d851e3caff1ec88cbc8 (diff)
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
Diffstat (limited to 'src/java/jogamp/common')
-rw-r--r--src/java/jogamp/common/os/MachineDescriptionRuntime.java32
1 files changed, 5 insertions, 27 deletions
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;
}
}