From 0a8e1566c766f3b5a5e71b5d80500034f1a614a8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 20 Jul 2011 07:30:48 +0200 Subject: Cleanup: Platform CPU enum, MachineDescription, Platform: - enum CPUFamily is part of CPUType - DALVIK -> ANDROID - ARM: ARM + ARMv[567] MachineDescription - self contained - static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi - add 'long double' - Removed MachineDescription32Bit, MachineDescription64Bit - createStatic(..) uses OS/CPU to fetch best match if not at runtime FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes TODO: StructAccessor's mapping to Buffer w/ index os sizeof() doesn't work, since offset may not be multiple of sizeof()! i.e. typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 so "longBuffer.get()" is invalid, but "byteBuffer.getLong()" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good. --- src/java/com/jogamp/gluegen/GlueGen.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/java/com/jogamp/gluegen/GlueGen.java') diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java index 9b0bb5f..c0e87ee 100644 --- a/src/java/com/jogamp/gluegen/GlueGen.java +++ b/src/java/com/jogamp/gluegen/GlueGen.java @@ -45,9 +45,6 @@ import com.jogamp.common.os.MachineDescription; import java.io.*; import java.util.*; -import jogamp.common.os.MachineDescription32Bit; -import jogamp.common.os.MachineDescription64Bit; - import antlr.*; import com.jogamp.gluegen.cgram.*; import com.jogamp.gluegen.cgram.types.*; @@ -192,8 +189,8 @@ public class GlueGen implements GlueEmitterControls { } // Provide MachineDescriptions to emitter - MachineDescription md32 = new MachineDescription32Bit(); - MachineDescription md64 = new MachineDescription64Bit(); + final MachineDescription md32 = MachineDescription.createStaticUnix32(); + final MachineDescription md64 = MachineDescription.createStaticUnix64(); emit.setMachineDescription(md32, md64); // Repackage the enum and #define statements from the parser into a common format -- cgit v1.2.3