From 30933c60156c67a9624fefae2be6504300ce71bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 30 Jan 2015 07:04:39 +0100 Subject: Bug 1122: Add AArch64 support (Android, GNU/Linux and in general) - Add AArch64 detection via - Elf Parser - Android properties - Java properties - Android: Validate CPUType.Family _and_ ABIType - MachineDescription - Remove redundant Type ID and its field - Reuse X86_64_UNIX for AArch64 (static config) New ARCH 'aarch64' for ant: armv8a aarch64 New CPUType.ARM64 (ARM): java: os.arch aarch64 arm64 New CPUType.ARMv8_A (ARM): java: os.arch armv8-a arm64-v8a New ABIType: EABI_AARCH64 --- src/java/com/jogamp/common/os/Platform.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/java/com/jogamp/common/os/Platform.java') diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java index 513d215..5b3befa 100644 --- a/src/java/com/jogamp/common/os/Platform.java +++ b/src/java/com/jogamp/common/os/Platform.java @@ -103,6 +103,10 @@ public class Platform extends PlatformPropsImpl { ARMv6( CPUFamily.ARM, 0x0002), /** ARM Cortex */ ARMv7( CPUFamily.ARM, 0x0004), + /** ARM64 default (64bit) */ + ARM64( CPUFamily.ARM, 0x0008), + /** ARM AArch64 (64bit) and AArch32 (32bit) */ + ARMv8_A( CPUFamily.ARM, 0x0010), /** PPC default */ PPC( CPUFamily.PPC, 0x0000), /** SPARC 32bit */ @@ -130,11 +134,13 @@ public class Platform extends PlatformPropsImpl { } public enum ABIType { - GENERIC_ABI ( 0x0000 ), + GENERIC_ABI ( 0x0000 ), /** ARM GNU-EABI ARMEL -mfloat-abi=softfp */ - EABI_GNU_ARMEL ( 0x0001 ), + EABI_GNU_ARMEL ( 0x0001 ), /** ARM GNU-EABI ARMHF -mfloat-abi=hard */ - EABI_GNU_ARMHF ( 0x0002 ); + EABI_GNU_ARMHF ( 0x0002 ), + /** ARM EABI AARCH64 (64bit) */ + EABI_AARCH64 ( 0x0003 ); public final int id; @@ -225,13 +231,12 @@ public class Platform extends PlatformPropsImpl { USE_TEMP_JAR_CACHE = _USE_TEMP_JAR_CACHE[0]; AWT_AVAILABLE = _AWT_AVAILABLE[0]; + final MachineDescription.StaticConfig smd = MachineDescriptionRuntime.getStatic(); MachineDescription md = MachineDescriptionRuntime.getRuntime(); if(null == md) { - final MachineDescription.StaticConfig smd = MachineDescriptionRuntime.getStatic(); md = smd.md; System.err.println("Warning: Using static MachineDescription: "+smd); } else { - final MachineDescription.StaticConfig smd = MachineDescriptionRuntime.getStatic(); if(!md.compatible(smd.md)) { throw new RuntimeException("Incompatible MachineDescriptions:"+PlatformPropsImpl.NEWLINE+ " Static "+smd+PlatformPropsImpl.NEWLINE+ -- cgit v1.2.3