GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
Platform.java
Go to the documentation of this file.
1/**
2 * Copyright 2010-2023 JogAmp Community. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without modification, are
5 * permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice, this list of
8 * conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * The views and conclusions contained in the software and documentation are those of the
25 * authors and should not be interpreted as representing official policies, either expressed
26 * or implied, of JogAmp Community.
27 */
28
29package com.jogamp.common.os;
30
31import java.security.PrivilegedAction;
32import java.util.concurrent.TimeUnit;
33
34import com.jogamp.common.jvm.JNILibLoaderBase;
35import com.jogamp.common.net.Uri;
36import com.jogamp.common.util.JarUtil;
37import com.jogamp.common.util.PropertyAccess;
38import com.jogamp.common.util.ReflectionUtil;
39import com.jogamp.common.util.SecurityUtil;
40import com.jogamp.common.util.VersionNumber;
41import com.jogamp.common.util.cache.TempJarCache;
42
43import jogamp.common.jvm.JVMUtil;
44import jogamp.common.os.MachineDataInfoRuntime;
45import jogamp.common.os.PlatformPropsImpl;
46
47/**
48 * Utility class for querying platform specific properties.
49 * <p>
50 * Some field declarations and it's static initialization has been delegated
51 * to it's super class {@link PlatformPropsImpl} to solve
52 * static initialization interdependencies w/ the GlueGen native library loading
53 * and it's derived information {@link #getMachineDataInfo()}, {@link #is32Bit()}, ..<br>
54 * This mechanism is preferred in this case to avoid synchronization and locking
55 * and allow better performance accessing the mentioned fields/methods.
56 * </p>
57 */
58public class Platform extends PlatformPropsImpl {
59
60 public enum OSType {
61 LINUX, FREEBSD, ANDROID, MACOS, SUNOS, HPUX, WINDOWS, OPENKODE, IOS;
62 }
63
64 public enum CPUFamily {
65 /** AMD/Intel */
67 /** ARM */
69 /** Power PC */
71 /** SPARC */
73 /** Mips */
75 /** PA RISC */
77 /** Itanium */
79 /** Hitachi SuperH */
81 }
82
83 public enum CPUType {
84 /** ARM 32bit default, usually little endian */
85 ARM( CPUFamily.ARM, true),
86 /** ARM7EJ, ARM9E, ARM10E, XScale, usually little endian */
88 /** ARM11, usually little endian */
90 /** ARM Cortex, usually little endian */
92 // 4
93
94 /** X86 32bit, little endian */
96 /** PPC 32bit default, usually big endian */
97 PPC( CPUFamily.PPC, true),
98 /** MIPS 32bit, big endian (mips) or little endian (mipsel) */
100 /** Hitachi SuperH 32bit default, ??? endian */
102 /** SPARC 32bit, big endian */
104 // 9
105
106 /** ARM64 default (64bit), usually little endian */
108 /** ARM AArch64 (64bit), usually little endian */
110 /** X86 64bit, little endian */
112 /** PPC 64bit default, usually big endian */
114 /** MIPS 64bit, big endian (mips64) or little endian (mipsel64) ? */
116 /** Itanium 64bit default, little endian */
118 /** SPARC 64bit, big endian */
120 /** PA_RISC2_0 64bit, ??? endian */
122 // 17
123
124 public final CPUFamily family;
125 public final boolean is32Bit;
126
127 CPUType(final CPUFamily type, final boolean is32Bit){
128 this.family = type;
129 this.is32Bit = is32Bit;
130 }
131
132 /**
133 * Returns {@code true} if the given {@link CPUType} is compatible
134 * w/ this one, i.e. at least {@link #family} and {@link #is32Bit} is equal.
135 */
136 public final boolean isCompatible(final CPUType other) {
137 if( null == other ) {
138 return false;
139 } else if( other == this ) {
140 return true;
141 } else {
142 return this.family == other.family &&
143 this.is32Bit == other.is32Bit;
144 }
145 }
146
147 public static final CPUType query(final String cpuABILower) {
148 if( null == cpuABILower ) {
149 throw new IllegalArgumentException("Null cpuABILower arg");
150 }
151 if( cpuABILower.equals("x86") ||
152 cpuABILower.equals("i386") ||
153 cpuABILower.equals("i486") ||
154 cpuABILower.equals("i586") ||
155 cpuABILower.equals("i686") ) {
156 return X86_32;
157 } else if( cpuABILower.equals("x86_64") ||
158 cpuABILower.equals("amd64") ) {
159 return X86_64;
160 } else if( cpuABILower.equals("ia64") ) {
161 return IA64;
162 } else if( cpuABILower.equals("aarch64") ) {
163 return ARM64;
164 } else if( cpuABILower.startsWith("arm") ) {
165 if( cpuABILower.equals("armv8-a") ||
166 cpuABILower.equals("arm-v8-a") ||
167 cpuABILower.equals("arm-8-a") ||
168 cpuABILower.equals("arm64-v8a") ) {
169 return ARMv8_A;
170 } else if( cpuABILower.startsWith("arm64") ) {
171 return ARM64;
172 } else if( cpuABILower.startsWith("armv7") ||
173 cpuABILower.startsWith("arm-v7") ||
174 cpuABILower.startsWith("arm-7") ||
175 cpuABILower.startsWith("armeabi-v7") ) {
176 return ARMv7;
177 } else if( cpuABILower.startsWith("armv5") ||
178 cpuABILower.startsWith("arm-v5") ||
179 cpuABILower.startsWith("arm-5") ) {
180 return ARMv5;
181 } else if( cpuABILower.startsWith("armv6") ||
182 cpuABILower.startsWith("arm-v6") ||
183 cpuABILower.startsWith("arm-6") ) {
184 return ARMv6;
185 } else {
186 return ARM;
187 }
188 } else if( cpuABILower.equals("sparcv9") ) {
189 return SPARCV9_64;
190 } else if( cpuABILower.equals("sparc") ) {
191 return SPARC_32;
192 } else if( cpuABILower.equals("pa_risc2.0") ) {
193 return PA_RISC2_0;
194 } else if( cpuABILower.startsWith("ppc64") ) {
195 return PPC64;
196 } else if( cpuABILower.startsWith("ppc") ) {
197 return PPC;
198 } else if( cpuABILower.startsWith("mips64") ) {
199 return MIPS_64;
200 } else if( cpuABILower.startsWith("mips") ) {
201 return MIPS_32;
202 } else if( cpuABILower.startsWith("superh") ) {
203 return SuperH;
204 } else {
205 throw new RuntimeException("Please port CPUType detection to your platform (CPU_ABI string '" + cpuABILower + "')");
206 }
207 }
208 }
209
210 public enum ABIType {
211 GENERIC_ABI ( 0x00 ),
212 /** ARM GNU-EABI ARMEL -mfloat-abi=softfp */
214 /** ARM GNU-EABI ARMHF -mfloat-abi=hard */
216 /** ARM EABI AARCH64 (64bit) */
217 EABI_AARCH64 ( 0x03 );
218
219 public final int id;
220
221 ABIType(final int id){
222 this.id = id;
223 }
224
225 /**
226 * Returns {@code true} if the given {@link ABIType} is compatible
227 * w/ this one, i.e. they are equal.
228 */
229 public final boolean isCompatible(final ABIType other) {
230 if( null == other ) {
231 return false;
232 } else {
233 return other == this;
234 }
235 }
236
237 public static final ABIType query(final CPUType cpuType, final String cpuABILower) {
238 if( null == cpuType ) {
239 throw new IllegalArgumentException("Null cpuType");
240 } else if( null == cpuABILower ) {
241 throw new IllegalArgumentException("Null cpuABILower");
242 } else if( CPUFamily.ARM == cpuType.family ) {
243 if( !cpuType.is32Bit ) {
244 return EABI_AARCH64;
245 } else if( cpuABILower.equals("armeabi-v7a-hard") ) {
246 return EABI_GNU_ARMHF;
247 } else {
248 return EABI_GNU_ARMEL;
249 }
250 } else {
251 return GENERIC_ABI;
252 }
253 }
254 }
255
256 private static final String useTempJarCachePropName = "jogamp.gluegen.UseTempJarCache";
257
258 /**
259 * Fixed basename of JAR file and native library.
260 * Dash replaced by underscore to allow static linkage via JEP 178.
261 */
262 private static final String libBaseName = "gluegen_rt";
263
264 //
265 // static initialization order:
266 //
267
268 /**
269 * System property: 'jogamp.gluegen.UseTempJarCache',
270 * defaults to true if {@link #OS_TYPE} is not {@link OSType#ANDROID}.
271 */
272 public static final boolean USE_TEMP_JAR_CACHE;
273
274 //
275 // post loading native lib:
276 //
277
278 private static final MachineDataInfo machineDescription;
279
280 /** <code>true</code> if AWT is available and not in headless mode, otherwise <code>false</code>. */
281 public static final boolean AWT_AVAILABLE;
282
283 private static final boolean isRunningFromJarURL;
284
285 static {
286 final boolean[] _isRunningFromJarURL = new boolean[] { false };
287 final boolean[] _USE_TEMP_JAR_CACHE = new boolean[] { false };
288 final boolean[] _AWT_AVAILABLE = new boolean[] { false };
289
290 SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
291 @Override
292 public Object run() {
293
294 PlatformPropsImpl.initSingleton(); // documenting the order of static initialization
295
296 final ClassLoader cl = Platform.class.getClassLoader();
297
298 final Uri platformClassJarURI;
299 {
300 Uri _platformClassJarURI = null;
301 try {
302 _platformClassJarURI = JarUtil.getJarUri(Platform.class.getName(), cl);
303 } catch (final Exception e) { }
304 platformClassJarURI = _platformClassJarURI;
305 }
306 _isRunningFromJarURL[0] = null != platformClassJarURI;
307
308 _USE_TEMP_JAR_CACHE[0] = ( OS_TYPE != OSType.ANDROID ) && ( OS_TYPE != OSType.IOS ) &&
309 ( null != platformClassJarURI ) &&
310 PropertyAccess.getBooleanProperty(useTempJarCachePropName, true, true);
311
312 // load GluegenRT native library
313 if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton() && TempJarCache.isInitialized(true) ) {
314 try {
315 JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { jogamp.common.Debug.class }, null);
316 } catch (final Exception e0) {
317 // IllegalArgumentException, IOException
318 System.err.println("Caught "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while JNILibLoaderBase.addNativeJarLibs(..)");
319 }
320 }
321 DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false, cl);
322
323 // JVM bug workaround
324 JVMUtil.initSingleton(); // requires gluegen_rt, one-time init.
325
326 // AWT Headless determination
327 if( !PropertyAccess.getBooleanProperty("java.awt.headless", true) &&
330 try {
331 _AWT_AVAILABLE[0] = false == ((Boolean)ReflectionUtil.callStaticMethod(ReflectionUtil.AWTNames.GraphicsEnvironmentClass, ReflectionUtil.AWTNames.isHeadlessMethod, null, null, cl)).booleanValue();
332 } catch (final Throwable t) { }
333 }
334 return null;
335 } } );
336 isRunningFromJarURL = _isRunningFromJarURL[0];
337 USE_TEMP_JAR_CACHE = _USE_TEMP_JAR_CACHE[0];
338 AWT_AVAILABLE = _AWT_AVAILABLE[0];
339
340 //
341 // Validate and setup MachineDataInfo.StaticConfig
342 //
343 MachineDataInfoRuntime.initialize();
344 machineDescription = MachineDataInfoRuntime.getRuntime();
345 }
346
347 private Platform() {}
348
349 /**
350 * @return true if we're running from a Jar URL, otherwise false
351 */
352 public static final boolean isRunningFromJarURL() {
353 return isRunningFromJarURL;
354 }
355
356 /**
357 * kick off static initialization of <i>platform property information</i> and <i>native gluegen_rt lib loading</i>
358 */
359 public static void initSingleton() { }
360
361 /**
362 * Returns true if this machine is little endian, otherwise false.
363 */
364 public static boolean isLittleEndian() {
365 return LITTLE_ENDIAN;
366 }
367
368 /**
369 * Returns the OS name.
370 * <p>In case of {@link OSType#ANDROID}, see {@link #getOSType()}, the OS name is Linux</p>
371 */
372 public static String getOSName() {
373 return OS;
374 }
375
376 /**
377 * Returns the OS version.
378 */
379 public static String getOSVersion() {
380 return OS_VERSION;
381 }
382
383 /**
384 * Returns the OS version number.
385 */
387 return OS_VERSION_NUMBER;
388 }
389
390 /**
391 * Returns the CPU architecture String.
392 */
393 public static String getArchName() {
394 return ARCH;
395 }
396
397 /**
398 * Returns the OS type.
399 * <p>In case of {@link OSType#ANDROID} the {@link #getOSName() OS name}, is Linux</p>
400 */
401 public static OSType getOSType() {
402 return OS_TYPE;
403 }
404
405 /**
406 * Returns the CPU family.
407 */
408 public static CPUFamily getCPUFamily() {
409 return CPU_ARCH.family;
410 }
411
412 /**
413 * Returns the CPU architecture type.
414 */
415 public static CPUType getCPUType() {
416 return CPU_ARCH;
417 }
418
419 /**
420 * Returns true if this JVM/ARCH is 32bit.
421 * <p>Shortcut to {@link #getCPUType()}.{@link CPUType#is32Bit is32Bit}</p>
422 */
423 public static boolean is32Bit() {
424 return CPU_ARCH.is32Bit; // used very often
425 }
426
427 /**
428 * Returns true if this JVM/ARCH is 64bit.
429 * <p>Shortcut to !{@link #getCPUType()}.{@link CPUType#is32Bit is32Bit}</p>
430 */
431 public static boolean is64Bit() {
432 return !CPU_ARCH.is32Bit; // used very often
433 }
434
435 /**
436 * Returns the ABI type.
437 * <p>
438 * In case of {@link CPUFamily#ARM}, the value is determined by parsing the <i>Elf Headers</i> of the running VM.
439 * </p>
440 * <p>
441 * Otherwise the value is {@link ABIType#GENERIC_ABI}.
442 * </p>
443 */
444 public static ABIType getABIType() {
445 return ABI_TYPE;
446 }
447
448 /**
449 * Returns the GlueGen common name for the currently running OSType and CPUType
450 * as implemented in the build system in 'gluegen-cpptasks-base.xml'.<br>
451 *
452 * @see #getOSAndArch(OSType, CPUType)
453 */
454 public static String getOSAndArch() {
455 return os_and_arch;
456 }
457
458 /**
459 * Returns the JAVA vendor.
460 */
461 public static String getJavaVendor() {
462 return JAVA_VENDOR;
463 }
464
465 /**
466 * Returns the JAVA VM name.
467 */
468 public static String getJavaVMName() {
469 return JAVA_VM_NAME;
470 }
471
472 /**
473 * Returns the JAVA runtime name.
474 */
475 public static String getJavaRuntimeName() {
476 return JAVA_RUNTIME_NAME;
477 }
478
479 /**
480 * Returns the JAVA vendor url.
481 */
482 public static String getJavaVendorURL() {
483 return JAVA_VENDOR_URL;
484 }
485
486 /**
487 * Returns the JAVA version.
488 */
489 public static String getJavaVersion() {
490 return JAVA_VERSION;
491 }
492
493 /**
494 * Returns the JAVA version number.
495 */
497 return JAVA_VERSION_NUMBER;
498 }
499
500 /**
501 * Returns the platform's line separator.
502 */
503 public static String getNewline() {
504 return NEWLINE;
505 }
506
507 /**
508 * Returns the MachineDataInfo of the running machine.
509 */
511 return machineDescription;
512 }
513
514 /** Returns <code>true</code> if AWT is available and not in headless mode, otherwise <code>false</code>. */
515 public static boolean isAWTAvailable() {
516 return AWT_AVAILABLE;
517 }
518
519 //
520 // time / jitter
521 //
522
523 /**
524 * Returns current monotonic milliseconds since start of this application.
525 * <p>
526 * Monotonic time shall be used for high-performance measurements of durations,
527 * since the underlying OS shall support fast calls.
528 * </p>
529 * @see Clock#currentMillis()
530 */
531 public static long currentMillis() {
532 return Clock.currentMillis();
533 }
534
535 /**
536 * Returns the unix based current monotonic time in milliseconds.
537 * <p>
538 * Monotonic time shall be used for high-performance measurements of durations,
539 * since the underlying OS shall support fast calls.
540 * </p>
541 * @see Clock#currentTimeMillis()
542 */
543 public static long currentTimeMillis() {
544 return Clock.currentTimeMillis();
545 }
546
547 /**
548 * Returns the estimated sleep jitter value in nanoseconds.
549 * <p>
550 * Includes a warm-up path, allowing hotspot to optimize the code.
551 * </p>
552 */
553 public static synchronized long getCurrentSleepJitter() {
554 getCurrentSleepJitterImpl(TimeUnit.MILLISECONDS.toNanos(10), 10); // warm-up
555 return getCurrentSleepJitterImpl(TimeUnit.MILLISECONDS.toNanos(10), 10);
556 }
557 private static long getCurrentSleepJitterImpl(final long nsDuration, final int splitInLoops) {
558 final long nsPeriod = nsDuration / splitInLoops;
559 final long t0_ns = Clock.currentNanos();
560 for(int i=splitInLoops; i>0; i--) {
561 try { TimeUnit.NANOSECONDS.sleep(nsPeriod); } catch (final InterruptedException e) { }
562 }
563 return ( ( Clock.currentNanos() - t0_ns ) - nsDuration ) / splitInLoops;
564 }
565
566}
567
static synchronized void loadLibrary(final String libname, final String[] preload, final boolean preloadIgnoreError, final ClassLoader cl)
Loads the library specified by libname, using the LoaderAction set by setLoadingAction(LoaderAction).
static boolean addNativeJarLibs(final Class<?>[] classesFromJavaJars, final String singleJarMarker)
Loads and adds a JAR file's native library to the TempJarCache.
This class implements an immutable Uri as defined by RFC 2396.
Definition: Uri.java:160
static native long currentNanos()
Returns current monotonic nanoseconds since start of this application.
static native long currentTimeMillis()
Returns the unix based current monotonic time in milliseconds.
static native long currentMillis()
Returns current monotonic milliseconds since start of this application.
Machine data description for alignment and size onle, see com.jogamp.gluegen.
Utility class for querying platform specific properties.
Definition: Platform.java:58
static synchronized long getCurrentSleepJitter()
Returns the estimated sleep jitter value in nanoseconds.
Definition: Platform.java:553
static final boolean USE_TEMP_JAR_CACHE
System property: 'jogamp.gluegen.UseTempJarCache', defaults to true if OS_TYPE is not OSType#ANDROID.
Definition: Platform.java:272
static VersionNumber getOSVersionNumber()
Returns the OS version number.
Definition: Platform.java:386
static final boolean isRunningFromJarURL()
Definition: Platform.java:352
static String getOSAndArch()
Returns the GlueGen common name for the currently running OSType and CPUType as implemented in the bu...
Definition: Platform.java:454
static boolean isAWTAvailable()
Returns true if AWT is available and not in headless mode, otherwise false.
Definition: Platform.java:515
static void initSingleton()
kick off static initialization of platform property information and native gluegen_rt lib loading
Definition: Platform.java:359
static String getOSVersion()
Returns the OS version.
Definition: Platform.java:379
static String getJavaVersion()
Returns the JAVA version.
Definition: Platform.java:489
static String getJavaVMName()
Returns the JAVA VM name.
Definition: Platform.java:468
static ABIType getABIType()
Returns the ABI type.
Definition: Platform.java:444
static VersionNumber getJavaVersionNumber()
Returns the JAVA version number.
Definition: Platform.java:496
static String getJavaVendorURL()
Returns the JAVA vendor url.
Definition: Platform.java:482
static OSType getOSType()
Returns the OS type.
Definition: Platform.java:401
static boolean is64Bit()
Returns true if this JVM/ARCH is 64bit.
Definition: Platform.java:431
static boolean isLittleEndian()
Returns true if this machine is little endian, otherwise false.
Definition: Platform.java:364
static MachineDataInfo getMachineDataInfo()
Returns the MachineDataInfo of the running machine.
Definition: Platform.java:510
static String getJavaRuntimeName()
Returns the JAVA runtime name.
Definition: Platform.java:475
static String getOSName()
Returns the OS name.
Definition: Platform.java:372
static long currentMillis()
Returns current monotonic milliseconds since start of this application.
Definition: Platform.java:531
static long currentTimeMillis()
Returns the unix based current monotonic time in milliseconds.
Definition: Platform.java:543
static String getArchName()
Returns the CPU architecture String.
Definition: Platform.java:393
static String getJavaVendor()
Returns the JAVA vendor.
Definition: Platform.java:461
static boolean is32Bit()
Returns true if this JVM/ARCH is 32bit.
Definition: Platform.java:423
static CPUFamily getCPUFamily()
Returns the CPU family.
Definition: Platform.java:408
static String getNewline()
Returns the platform's line separator.
Definition: Platform.java:503
static final boolean AWT_AVAILABLE
true if AWT is available and not in headless mode, otherwise false.
Definition: Platform.java:281
static CPUType getCPUType()
Returns the CPU architecture type.
Definition: Platform.java:415
static Uri getJarUri(final String clazzBinName, final ClassLoader cl)
The Class's "com.jogamp.common.GlueGenVersion" Uri jar:sub_protocol:/some/path/gluegen-rt....
Definition: JarUtil.java:139
Helper routines for accessing properties.
static final boolean getBooleanProperty(final String property, final boolean jnlpAlias)
static final Object callStaticMethod(final String clazzName, final String methodName, final Class<?>[] argTypes, final Object[] args, final ClassLoader cl)
static final boolean isClassAvailable(final String clazzName, final ClassLoader cl)
Returns true only if the class could be loaded.
static< T > T doPrivileged(final PrivilegedAction< T > o)
Call wrapper for java.security.AccessController#doPrivileged(PrivilegedAction).
Simple version number class containing a version number either being defined explicit or derived from...
Static Jar file cache handler using an underlying instance of TempFileCache, see getTempFileCache().
static boolean isInitialized(final boolean forExecutables)
static boolean initSingleton()
Documented way to kick off static initialization.
EABI_AARCH64
ARM EABI AARCH64 (64bit)
Definition: Platform.java:217
EABI_GNU_ARMEL
ARM GNU-EABI ARMEL -mfloat-abi=softfp.
Definition: Platform.java:213
static final ABIType query(final CPUType cpuType, final String cpuABILower)
Definition: Platform.java:237
EABI_GNU_ARMHF
ARM GNU-EABI ARMHF -mfloat-abi=hard.
Definition: Platform.java:215
final boolean isCompatible(final ABIType other)
Returns true if the given ABIType is compatible w/ this one, i.e.
Definition: Platform.java:229
static final CPUType query(final String cpuABILower)
Definition: Platform.java:147
IA64
Itanium 64bit default, little endian.
Definition: Platform.java:117
PA_RISC2_0
PA_RISC2_0 64bit, ??? endian.
Definition: Platform.java:121
MIPS_64
MIPS 64bit, big endian (mips64) or little endian (mipsel64) ?
Definition: Platform.java:115
SPARCV9_64
SPARC 64bit, big endian.
Definition: Platform.java:119
PPC
PPC 32bit default, usually big endian.
Definition: Platform.java:97
CPUType(final CPUFamily type, final boolean is32Bit)
Definition: Platform.java:127
ARM
ARM 32bit default, usually little endian.
Definition: Platform.java:85
ARMv6
ARM11, usually little endian.
Definition: Platform.java:89
ARMv7
ARM Cortex, usually little endian.
Definition: Platform.java:91
PPC64
PPC 64bit default, usually big endian.
Definition: Platform.java:113
final boolean isCompatible(final CPUType other)
Returns true if the given CPUType is compatible w/ this one, i.e.
Definition: Platform.java:136
ARMv5
ARM7EJ, ARM9E, ARM10E, XScale, usually little endian.
Definition: Platform.java:87
ARMv8_A
ARM AArch64 (64bit), usually little endian.
Definition: Platform.java:109
X86_32
X86 32bit, little endian.
Definition: Platform.java:95
X86_64
X86 64bit, little endian.
Definition: Platform.java:111
ARM64
ARM64 default (64bit), usually little endian.
Definition: Platform.java:107
MIPS_32
MIPS 32bit, big endian (mips) or little endian (mipsel)
Definition: Platform.java:99
SPARC_32
SPARC 32bit, big endian.
Definition: Platform.java:103
SuperH
Hitachi SuperH 32bit default, ??? endian.
Definition: Platform.java:101