View | Details | Raw Unified | Return to bug 1014
Collapse All | Expand All

(-)gluegen2-2.1.5.orig/src/java/com/jogamp/common/os/MachineDescription.java (-2 / +12 lines)
Lines 60-66 Link Here
60
      /** {@link Platform.CPUType#X86_64} Little Endian Windows */
60
      /** {@link Platform.CPUType#X86_64} Little Endian Windows */
61
      X86_64_WINDOWS(Platform.CPUType.X86_64),
61
      X86_64_WINDOWS(Platform.CPUType.X86_64),
62
      /** {@link Platform.CPUType#SPARC_32} Big Endian Solaris */
62
      /** {@link Platform.CPUType#SPARC_32} Big Endian Solaris */
63
      SPARC_32_SUNOS(Platform.CPUType.SPARC_32);
63
      SPARC_32_SUNOS(Platform.CPUType.SPARC_32),
64
      /** {@link Platform.CPUType#MIPS_32} Big Endian Unix */
65
      MIPS_32_UNIX(Platform.CPUType.MIPS_32),
66
      /** {@link Platform.CPUType#MIPSEL_32} Little Endian Unix */
67
      MIPSEL_32_UNIX(Platform.CPUType.MIPSEL_32);
64
68
65
      public final Platform.CPUType cpu;
69
      public final Platform.CPUType cpu;
66
70
Lines 77-82 Link Here
77
  private final static int[] size_x86_64_unix     =  { 4,    8,     4,     8,     16,    8,   4096 };
81
  private final static int[] size_x86_64_unix     =  { 4,    8,     4,     8,     16,    8,   4096 };
78
  private final static int[] size_x86_64_windows  =  { 4,    4,     4,     8,     16,    8,   4096 };
82
  private final static int[] size_x86_64_windows  =  { 4,    4,     4,     8,     16,    8,   4096 };
79
  private final static int[] size_sparc_32_sunos  =  { 4,    4,     4,     8,     16,    4,   8192 };
83
  private final static int[] size_sparc_32_sunos  =  { 4,    4,     4,     8,     16,    4,   8192 };
84
  private final static int[] size_mips_32_unix    =  { 4,    4,     4,     8,      8,    4,   4096 };
80
85
81
  /*                               arch   os          i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */
86
  /*                               arch   os          i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */
82
  private final static int[] align_armeabi        =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
87
  private final static int[] align_armeabi        =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
Lines 86-91 Link Here
86
  private final static int[] align_x86_64_unix    =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
91
  private final static int[] align_x86_64_unix    =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
87
  private final static int[] align_x86_64_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,     16,   8 };
92
  private final static int[] align_x86_64_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,     16,   8 };
88
  private final static int[] align_sparc_32_sunos =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
93
  private final static int[] align_sparc_32_sunos =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
94
  private final static int[] align_mips_32_unix   =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
89
95
90
  public enum StaticConfig {
96
  public enum StaticConfig {
91
      /** {@link MachineDescription.ID#ARMle_EABI } */
97
      /** {@link MachineDescription.ID#ARMle_EABI } */
Lines 101-107 Link Here
101
      /** {@link MachineDescription.ID#X86_64_WINDOWS } */
107
      /** {@link MachineDescription.ID#X86_64_WINDOWS } */
102
      X86_64_WINDOWS(ID.X86_64_WINDOWS, true,  size_x86_64_windows, align_x86_64_windows),
108
      X86_64_WINDOWS(ID.X86_64_WINDOWS, true,  size_x86_64_windows, align_x86_64_windows),
103
      /** {@link MachineDescription.ID#SPARC_32_SUNOS } */
109
      /** {@link MachineDescription.ID#SPARC_32_SUNOS } */
104
      SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos);
110
      SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos),
111
      /** {@link MachineDescription.ID#MIPS_32_UNIX } */
112
      MIPS_32_UNIX(ID.MIPS_32_UNIX, false, size_mips_32_unix, align_mips_32_unix),
113
     /** {@link MachineDescription.ID#MIPSEL_32_UNIX } */
114
      MIPSEL_32_UNIX(ID.MIPSEL_32_UNIX, true, size_mips_32_unix, align_mips_32_unix);
105
115
106
      public final ID id;
116
      public final ID id;
107
      public final MachineDescription md;
117
      public final MachineDescription md;
(-)gluegen2-2.1.5.orig/src/java/com/jogamp/common/os/Platform.java (+2 lines)
Lines 113-118 Link Here
113
        MIPS_32(  CPUFamily.MIPS,     0x0001),
113
        MIPS_32(  CPUFamily.MIPS,     0x0001),
114
        /** MIPS 64bit */
114
        /** MIPS 64bit */
115
        MIPS_64(  CPUFamily.MIPS,     0x0002),
115
        MIPS_64(  CPUFamily.MIPS,     0x0002),
116
        /** MIPS 32bit LE*/
117
        MIPSEL_32(  CPUFamily.MIPS,   0x0004),
116
        /** Itanium default */
118
        /** Itanium default */
117
        IA64(      CPUFamily.IA64,    0x0000),
119
        IA64(      CPUFamily.IA64,    0x0000),
118
        /** PA_RISC2_0 */
120
        /** PA_RISC2_0 */
(-)gluegen2-2.1.5.orig/src/java/jogamp/common/os/MachineDescriptionRuntime.java (+6 lines)
Lines 78-83 Link Here
78
        case ARMv5:
78
        case ARMv5:
79
        case ARMv6:
79
        case ARMv6:
80
        case ARMv7:
80
        case ARMv7:
81
        case MIPS_32:
82
        case MIPSEL_32:
81
        case SPARC_32:
83
        case SPARC_32:
82
        case PPC:
84
        case PPC:
83
            return true;
85
            return true;
Lines 95-100 Link Here
95
      if( isCPUArch32Bit(cpuType) ) {
97
      if( isCPUArch32Bit(cpuType) ) {
96
          if( cpuType.getFamily() == Platform.CPUFamily.ARM && littleEndian) {
98
          if( cpuType.getFamily() == Platform.CPUFamily.ARM && littleEndian) {
97
              return StaticConfig.ARMle_EABI;
99
              return StaticConfig.ARMle_EABI;
100
          } else if( cpuType == Platform.CPUType.MIPS_32) {
101
              return StaticConfig.MIPS_32_UNIX;
102
          } else if( cpuType == Platform.CPUType.MIPSEL_32) {
103
              return StaticConfig.MIPSEL_32_UNIX;
98
          } else if( osType == Platform.OSType.WINDOWS ) {
104
          } else if( osType == Platform.OSType.WINDOWS ) {
99
              return StaticConfig.X86_32_WINDOWS;
105
              return StaticConfig.X86_32_WINDOWS;
100
          } else if( osType == Platform.OSType.MACOS ) {
106
          } else if( osType == Platform.OSType.MACOS ) {
(-)gluegen2-2.1.5.orig/src/java/jogamp/common/os/PlatformPropsImpl.java (+13 lines)
Lines 298-303 Link Here
298
            return CPUType.PPC;
298
            return CPUType.PPC;
299
        } else if( archLower.equals("mips") ) {        // android
299
        } else if( archLower.equals("mips") ) {        // android
300
            return CPUType.MIPS_32;
300
            return CPUType.MIPS_32;
301
        } else if( archLower.equals("mipsel") ) {
302
            return CPUType.MIPSEL_32;
301
        } else {
303
        } else {
302
            throw new RuntimeException("Please port CPU detection to your platform (" + OS_lower + "/" + archLower + ")");
304
            throw new RuntimeException("Please port CPU detection to your platform (" + OS_lower + "/" + archLower + ")");
303
        }
305
        }
Lines 406-411 Link Here
406
            } else if ( eh.isMips() ) {
408
            } else if ( eh.isMips() ) {
407
                cpuType[0] = CPUType.MIPS_32; // FIXME
409
                cpuType[0] = CPUType.MIPS_32; // FIXME
408
                abiType[0] = ABIType.GENERIC_ABI;
410
                abiType[0] = ABIType.GENERIC_ABI;
411
            } else if ( eh.isMipsel() ) {
412
                cpuType[0] = CPUType.MIPSEL_32;
413
                abiType[0] = ABIType.GENERIC_ABI;
409
            }
414
            }
410
            res = eh;
415
            res = eh;
411
        } catch(Throwable t) {
416
        } catch(Throwable t) {
Lines 501-506 Link Here
501
     *   <li>linux-i586</li>
506
     *   <li>linux-i586</li>
502
     *   <li>linux-armv6</li>
507
     *   <li>linux-armv6</li>
503
     *   <li>linux-armv6hf</li>
508
     *   <li>linux-armv6hf</li>
509
     *   <li>linux-mips</li>
510
     *   <li>linux-mipsel</li>
504
     *   <li>android-armv6</li>
511
     *   <li>android-armv6</li>
505
     *   <li>macosx-universal</li>
512
     *   <li>macosx-universal</li>
506
     *   <li>solaris-sparc</li>
513
     *   <li>solaris-sparc</li>
Lines 525-530 Link Here
525
            case ARMv7:
532
            case ARMv7:
526
                _os_and_arch = "armv6"; // TODO: sync with gluegen-cpptasks-base.xml
533
                _os_and_arch = "armv6"; // TODO: sync with gluegen-cpptasks-base.xml
527
                break;
534
                break;
535
            case MIPS_32:
536
                _os_and_arch = "mips";
537
                break;
538
            case MIPSEL_32:
539
                _os_and_arch = "mipsel";
540
                break;
528
            case SPARC_32:
541
            case SPARC_32:
529
                _os_and_arch = "sparc";
542
                _os_and_arch = "sparc";
530
                break;
543
                break;
(-)gluegen2-2.1.5.orig/src/java/jogamp/common/os/elf/ElfHeader.java (-3 / +12 lines)
Lines 484-495 Link Here
484
484
485
    /**
485
    /**
486
     * Returns true if {@link #getMachine() machine} is a 32 or 64 bit MIPS CPU
486
     * Returns true if {@link #getMachine() machine} is a 32 or 64 bit MIPS CPU
487
     * of type {@link #EM_MIPS}, {@link #EM_MIPS_X} or {@link #EM_MIPS_RS3_LE}. */
487
     * of type {@link #EM_MIPS} or {@link #EM_MIPS_X}. */
488
    public final boolean isMips() {
488
    public final boolean isMips() {
489
        final short m = getMachine();
489
        final short m = getMachine();
490
        return EM_MIPS == m ||
490
        return EM_MIPS == m ||
491
               EM_MIPS_X == m ||
491
               EM_MIPS_X == m;
492
               EM_MIPS_RS3_LE == m;
492
    }
493
494
    /**
495
     * Returns true if {@link #getMachine() machine} is a 32  MIPS CPU
496
     * of type {@link #EM_MIPS_RS3_LE}. */
497
    public final boolean isMipsel() {
498
        final short m = getMachine();
499
        return EM_MIPS_RS3_LE == m;
493
    }
500
    }
494
501
495
    /** Returns the processor-specific flags associated with the file. */
502
    /** Returns the processor-specific flags associated with the file. */
Lines 568-573 Link Here
568
            machineS=", itanium";
575
            machineS=", itanium";
569
        } else if( isMips() ) {
576
        } else if( isMips() ) {
570
            machineS=", mips";
577
            machineS=", mips";
578
        } else if( isMipsel() ) {
579
            machineS=", mipsel";
571
        } else {
580
        } else {
572
            machineS="";
581
            machineS="";
573
        }
582
        }

Return to bug 1014