summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorBritta Eckhardt <[email protected]>2013-06-13 20:53:44 +0200
committerSven Gothel <[email protected]>2013-06-13 20:53:44 +0200
commit3cf28f2980b1593e4b32230d5206decd6afe2cbb (patch)
treec1c2a4c8e8b644456f7b2bc91c7d02797db569fd /src/java
parent1fedf87d2808ea1afa51ec4d6432a8e5379ae07e (diff)
Fix Bug 749: Add Support for Solaris SPARC 32bit
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/jogamp/common/os/MachineDescription.java20
-rw-r--r--src/java/jogamp/common/os/MachineDescriptionRuntime.java29
2 files changed, 30 insertions, 19 deletions
diff --git a/src/java/com/jogamp/common/os/MachineDescription.java b/src/java/com/jogamp/common/os/MachineDescription.java
index 79f2b8f..ab0885e 100644
--- a/src/java/com/jogamp/common/os/MachineDescription.java
+++ b/src/java/com/jogamp/common/os/MachineDescription.java
@@ -58,7 +58,9 @@ public class MachineDescription {
/** {@link Platform.CPUType#X86_64} Little Endian MacOS */
X86_32_WINDOWS(Platform.CPUType.X86_32),
/** {@link Platform.CPUType#X86_64} Little Endian Windows */
- X86_64_WINDOWS(Platform.CPUType.X86_64);
+ X86_64_WINDOWS(Platform.CPUType.X86_64),
+ /** {@link Platform.CPUType#SPARC_32} Big Endian Solaris */
+ SPARC_32_SUNOS(Platform.CPUType.SPARC_32);
public final Platform.CPUType cpu;
@@ -74,6 +76,7 @@ public class MachineDescription {
private final static int[] size_x86_32_windows = { 4, 4, 4, 8, 12, 4, 4096 };
private final static int[] size_x86_64_unix = { 4, 8, 4, 8, 16, 8, 4096 };
private final static int[] size_x86_64_windows = { 4, 4, 4, 8, 16, 8, 4096 };
+ private final static int[] size_sparc_32_sunos = { 4, 4, 4, 8, 16, 4, 8192 };
/* arch os i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */
private final static int[] align_armeabi = { 1, 2, 4, 8, 4, 4, 4, 8, 8, 4 };
@@ -82,20 +85,23 @@ public class MachineDescription {
private final static int[] align_x86_32_windows = { 1, 2, 4, 8, 4, 4, 4, 8, 4, 4 };
private final static int[] align_x86_64_unix = { 1, 2, 4, 8, 4, 8, 4, 8, 16, 8 };
private final static int[] align_x86_64_windows = { 1, 2, 4, 8, 4, 4, 4, 8, 16, 8 };
+ private final static int[] align_sparc_32_sunos = { 1, 2, 4, 8, 4, 4, 4, 8, 8, 4 };
public enum StaticConfig {
/** {@link MachineDescription.ID#ARMle_EABI } */
- ARMle_EABI(ID.ARMle_EABI, true, size_armeabi, align_armeabi),
+ ARMle_EABI(ID.ARMle_EABI, true, size_armeabi, align_armeabi),
/** {@link MachineDescription.ID#X86_32_UNIX } */
- X86_32_UNIX(ID.X86_32_UNIX, true, size_x86_32_unix, align_x86_32_unix),
+ X86_32_UNIX(ID.X86_32_UNIX, true, size_x86_32_unix, align_x86_32_unix),
/** {@link MachineDescription.ID#X86_64_UNIX } */
- X86_64_UNIX(ID.X86_64_UNIX, true, size_x86_64_unix, align_x86_64_unix),
+ X86_64_UNIX(ID.X86_64_UNIX, true, size_x86_64_unix, align_x86_64_unix),
/** {@link MachineDescription.ID#X86_32_MACOS } */
- X86_32_MACOS(ID.X86_32_MACOS, true, size_x86_32_macos, align_x86_32_macos),
+ X86_32_MACOS(ID.X86_32_MACOS, true, size_x86_32_macos, align_x86_32_macos),
/** {@link MachineDescription.ID#X86_32_WINDOWS } */
- X86_32_WINDOWS(ID.X86_32_WINDOWS, true, size_x86_32_windows, align_x86_32_windows),
+ X86_32_WINDOWS(ID.X86_32_WINDOWS, true, size_x86_32_windows, align_x86_32_windows),
/** {@link MachineDescription.ID#X86_64_WINDOWS } */
- X86_64_WINDOWS(ID.X86_64_WINDOWS, true, size_x86_64_windows, align_x86_64_windows);
+ X86_64_WINDOWS(ID.X86_64_WINDOWS, true, size_x86_64_windows, align_x86_64_windows),
+ /** {@link MachineDescription.ID#SPARC_32_SUNOS } */
+ SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos);
public final ID id;
public final MachineDescription md;
diff --git a/src/java/jogamp/common/os/MachineDescriptionRuntime.java b/src/java/jogamp/common/os/MachineDescriptionRuntime.java
index 8b38b25..a58accd 100644
--- a/src/java/jogamp/common/os/MachineDescriptionRuntime.java
+++ b/src/java/jogamp/common/os/MachineDescriptionRuntime.java
@@ -74,19 +74,24 @@ public class MachineDescriptionRuntime {
private static MachineDescription.StaticConfig getStaticImpl() {
if(isCPUArch32Bit()) {
- if(PlatformPropsImpl.CPU_ARCH.getFamily() == Platform.CPUFamily.ARM && PlatformPropsImpl.LITTLE_ENDIAN) {
- return StaticConfig.ARMle_EABI;
- } else if(PlatformPropsImpl.OS_TYPE == Platform.OSType.WINDOWS) {
- return StaticConfig.X86_32_WINDOWS;
- } else if(PlatformPropsImpl.OS_TYPE == Platform.OSType.MACOS) {
- return StaticConfig.X86_32_MACOS;
- }
- return StaticConfig.X86_32_UNIX;
+ if(PlatformPropsImpl.CPU_ARCH.getFamily() == Platform.CPUFamily.ARM && PlatformPropsImpl.LITTLE_ENDIAN) {
+ return StaticConfig.ARMle_EABI;
+ } else if(PlatformPropsImpl.OS_TYPE == Platform.OSType.WINDOWS) {
+ return StaticConfig.X86_32_WINDOWS;
+ } else if(PlatformPropsImpl.OS_TYPE == Platform.OSType.MACOS) {
+ return StaticConfig.X86_32_MACOS;
+ } else if (PlatformPropsImpl.OS_TYPE == Platform.OSType.SUNOS) {
+ if (PlatformPropsImpl.CPU_ARCH == Platform.CPUType.SPARC_32) {
+ return StaticConfig.SPARC_32_SUNOS;
+ }
+ // TODO SPARCv9 description is missing
+ }
+ return StaticConfig.X86_32_UNIX;
} else {
- if(PlatformPropsImpl.OS_TYPE == Platform.OSType.WINDOWS) {
- return StaticConfig.X86_64_WINDOWS;
- }
- return StaticConfig.X86_64_UNIX;
+ if(PlatformPropsImpl.OS_TYPE == Platform.OSType.WINDOWS) {
+ return StaticConfig.X86_64_WINDOWS;
+ }
+ return StaticConfig.X86_64_UNIX;
}
}