diff options
author | Sven Gothel <[email protected]> | 2011-07-17 19:55:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-07-17 19:55:36 +0200 |
commit | 8fc841257cae6b49399b29dfa53e3e834d27cabb (patch) | |
tree | 5012bb4ec63378017479d51e65262974a545645e /src/java/jogamp/common/os | |
parent | 2bf03e9814477b412f9533d3ba3f4c597892501e (diff) |
GlueGen: Alignment Cleanup ..
- SizeThunk
- rename: compute -> computeSize
- add: computeAlignment
- merge types: char -> int8, short -> int16
- 'int' and 'long' may differ
-
Diffstat (limited to 'src/java/jogamp/common/os')
3 files changed, 12 insertions, 16 deletions
diff --git a/src/java/jogamp/common/os/MachineDescription32Bit.java b/src/java/jogamp/common/os/MachineDescription32Bit.java index ec2bb4c..aebac80 100644 --- a/src/java/jogamp/common/os/MachineDescription32Bit.java +++ b/src/java/jogamp/common/os/MachineDescription32Bit.java @@ -51,11 +51,11 @@ import com.jogamp.common.os.MachineDescription; */ public class MachineDescription32Bit extends MachineDescription { public MachineDescription32Bit() { - // size: char, short, int, long, float, double, pointer, pageSize - // alignment: int8, int16, int32, int64, char, short, int, long, float, double, pointer + // size: int, long, float, double, pointer, pageSize + // alignment: int8, int16, int32, int64, int, long, float, double, pointer super( false /* runtime validated */, true /* little endian */, - /* size */ 1, 2, 4, 4, 4, 8, 4, 4096, - /*align */ 1, 2, 4, 8, 1, 2, 4, 4, 4, 8, 4); + /* size */ 4, 4, 4, 8, 4, 4096, + /*align */ 1, 2, 4, 8, 4, 4, 4, 8, 4); } } diff --git a/src/java/jogamp/common/os/MachineDescription64Bit.java b/src/java/jogamp/common/os/MachineDescription64Bit.java index 254ba30..4b3b13f 100644 --- a/src/java/jogamp/common/os/MachineDescription64Bit.java +++ b/src/java/jogamp/common/os/MachineDescription64Bit.java @@ -52,10 +52,10 @@ import com.jogamp.common.os.MachineDescription; */ public class MachineDescription64Bit extends MachineDescription { public MachineDescription64Bit() { - // size: char, short, int, long, float, double, pointer, pageSize - // alignment: int8, int16, int32, int64, char, short, int, long, float, double, pointer + // size: int, long, float, double, pointer, pageSize + // alignment: int8, int16, int32, int64, int, long, float, double, pointer super( false /* runtime validated */, true /* little endian */, - /* size */ 1, 2, 4, 8 /* on win, long is 4 !!! */, 4, 8, 8, 4096, - /*align */ 1, 2, 4, 8, 1, 2, 4, 8, 4, 8, 8); + /* size */ 4, 8 /* on win, long is 4 !!! */, 4, 8, 8, 4096, + /*align */ 1, 2, 4, 8, 4, 8, 4, 8, 8); } } diff --git a/src/java/jogamp/common/os/MachineDescriptionRuntime.java b/src/java/jogamp/common/os/MachineDescriptionRuntime.java index f904151..5d4a8c3 100644 --- a/src/java/jogamp/common/os/MachineDescriptionRuntime.java +++ b/src/java/jogamp/common/os/MachineDescriptionRuntime.java @@ -75,16 +75,16 @@ public class MachineDescriptionRuntime { } private static MachineDescription getMachineDescriptionImpl(int pointerSize, int pageSize) { - // size: char, short, int, long, float, double, pointer - // alignment: int8, int16, int32, int64, char, short, int, long, float, double, pointer + // size: int, long, float, double, pointer, pageSize + // alignment: int8, int16, int32, int64, int, long, float, double, pointer return new MachineDescription( true /* runtime validated */, isLittleEndianImpl(), - getSizeOfCharImpl(), getSizeOfShortImpl(), getSizeOfIntImpl(), getSizeOfLongImpl(), + getSizeOfIntImpl(), getSizeOfLongImpl(), getSizeOfFloatImpl(), getSizeOfDoubleImpl(), pointerSize, pageSize, getAlignmentInt8Impl(), getAlignmentInt16Impl(), getAlignmentInt32Impl(), getAlignmentInt64Impl(), - getAlignmentCharImpl(), getAlignmentShortImpl(), getAlignmentIntImpl(), getAlignmentLongImpl(), + getAlignmentIntImpl(), getAlignmentLongImpl(), getAlignmentFloatImpl(), getAlignmentDoubleImpl(), getAlignmentPointerImpl()); } private static boolean isLittleEndianImpl() { @@ -102,15 +102,11 @@ public class MachineDescriptionRuntime { private static native int getAlignmentInt16Impl(); private static native int getAlignmentInt32Impl(); private static native int getAlignmentInt64Impl(); - private static native int getAlignmentCharImpl(); - private static native int getAlignmentShortImpl(); private static native int getAlignmentIntImpl(); private static native int getAlignmentLongImpl(); private static native int getAlignmentPointerImpl(); private static native int getAlignmentFloatImpl(); private static native int getAlignmentDoubleImpl(); - private static native int getSizeOfCharImpl(); - private static native int getSizeOfShortImpl(); private static native int getSizeOfIntImpl(); private static native int getSizeOfLongImpl(); private static native int getSizeOfPointerImpl(); |