summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-24 10:11:03 +0200
committerSven Gothel <[email protected]>2011-10-24 10:11:03 +0200
commit0bafac07b61f10c1a24e8c052937607bbfcb39ec (patch)
tree676400dcb7cc1a83bbdef7ba9c0ca95a0c54b45d
parent6ea352bea79ed74a51ee4f63833b7f4b25b00ffc (diff)
MachineDescriptor Static: Add Mac-OsX 32bit gcc4 special case with sizeof(long double) == 8
-rw-r--r--src/java/com/jogamp/common/os/MachineDescription.java8
-rw-r--r--src/java/jogamp/common/os/MachineDescriptionRuntime.java2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/os/MachineDescription.java b/src/java/com/jogamp/common/os/MachineDescription.java
index 43f2975..317b278 100644
--- a/src/java/com/jogamp/common/os/MachineDescription.java
+++ b/src/java/com/jogamp/common/os/MachineDescription.java
@@ -51,7 +51,9 @@ public class MachineDescription {
X86_32_UNIX(Platform.CPUType.X86_32),
/** {@link Platform.CPUType#X86_64} Little Endian Unix */
X86_64_UNIX(Platform.CPUType.X86_64),
- /** {@link Platform.CPUType#X86_32} Little Endian Windows */
+ /** {@link Platform.CPUType#X86_32} Little Endian MacOS (Special case gcc4/OSX) */
+ X86_32_MACOS(Platform.CPUType.X86_32),
+ /** {@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);
@@ -66,6 +68,7 @@ public class MachineDescription {
/* arch os int, long, float, doubl, ldoubl, ptr, page */
private final static int[] size_armeabi = { 4, 4, 4, 8, 8, 4, 4096 };
private final static int[] size_x86_32_unix = { 4, 4, 4, 8, 12, 4, 4096 };
+ private final static int[] size_x86_32_macos = { 4, 4, 4, 8, 16, 4, 4096 };
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 };
@@ -73,6 +76,7 @@ public class MachineDescription {
/* 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 };
private final static int[] align_x86_32_unix = { 1, 2, 4, 4, 4, 4, 4, 4, 4, 4 };
+ private final static int[] align_x86_32_macos = { 1, 2, 4, 4, 4, 4, 4, 4, 16, 4 };
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 };
@@ -84,6 +88,8 @@ public class MachineDescription {
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),
+ /** {@link MachineDescription.ID#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),
/** {@link MachineDescription.ID#X86_64_WINDOWS } */
diff --git a/src/java/jogamp/common/os/MachineDescriptionRuntime.java b/src/java/jogamp/common/os/MachineDescriptionRuntime.java
index e7f156f..3a89395 100644
--- a/src/java/jogamp/common/os/MachineDescriptionRuntime.java
+++ b/src/java/jogamp/common/os/MachineDescriptionRuntime.java
@@ -78,6 +78,8 @@ public class MachineDescriptionRuntime {
return StaticConfig.ARMle_EABI;
} else if(Platform.getOSType() == Platform.OSType.WINDOWS) {
return StaticConfig.X86_32_WINDOWS;
+ } else if(Platform.getOSType() == Platform.OSType.MACOS) {
+ return StaticConfig.X86_32_MACOS;
}
return StaticConfig.X86_32_UNIX;
} else {