Class ProcessorType
java.lang.Object
com.pnfsoftware.jeb.util.base.DynamicEnum<ProcessorType>
com.pnfsoftware.jeb.core.units.codeobject.ProcessorType
Dynamic enumeration of processor types.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ProcessorTypevariants of ARM 32-bit (arm, thumb, thumb2, fpu/neon, arm-v7, etc.)static final ProcessorTypevariants of ARM aarch64static final ProcessorTypeAtmel AVR 8-bit microcontrollerstatic final ProcessorTypeAtmel Corporation 32-bit microprocessor familystatic final intNumber of built-in processor types.protected static LinkedHashMap<String, ProcessorType> Registered processor types.static final ProcessorTypevariants of MIPS 32-bitstatic final ProcessorTypevariants of MIPS 64-bitstatic final ProcessorTypeReserved - Virtual processor ("PNF DUMMY 1") reserved for internal testing use.static final ProcessorTypeReserved - Virtual processor ("PNF DUMMY 2") reserved for internal testing use.static final ProcessorTypeunknown processorstatic final ProcessorTypevariants of X86 32-bitstatic final ProcessorTypevariants of AMD64Fields inherited from class com.pnfsoftware.jeb.util.base.DynamicEnum
id, name -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProcessorType(int id, String name) protectedProcessorType(int id, String name, ProcessorFamily family) -
Method Summary
Modifier and TypeMethodDescriptionstatic intcount()Get number of registered processor types.Retrieve the processor family.booleanis64Bit()Determine whether this is a 64-bit processor.booleanisARM()Convenience method to perform an ARM family checkbooleanisAVR()Determine whether this is an AVR processor.booleanisIntel()Convenience method to perform an X86 family checkbooleanisMIPS()Convenience method to perform a MIPS family checkintordinal()Get this entry's current ordinal in its dynamic enum.static ProcessorTyperegister(int id, String name, ProcessorFamily family) Dynamically add a new processor type.static booleanunregister(String name) Unregister a dynamic processor type.static ProcessorTypevalueOf(int id) Retrieve a processor type by id.static ProcessorTypeRetrieve a processor type by name.static Collection<ProcessorType> values()Get registered processor types.Methods inherited from class com.pnfsoftware.jeb.util.base.DynamicEnum
equals, hashCode, id, isBuiltin, isCompatibleWith, name, ordinal, register, toString, unregister, valueOf, valueOf, values, verifyAvailability
-
Field Details
-
map
Registered processor types. -
UNKNOWN
unknown processor -
X86
variants of X86 32-bit -
X86_64
variants of AMD64 -
ARM
variants of ARM 32-bit (arm, thumb, thumb2, fpu/neon, arm-v7, etc.) -
ARM64
variants of ARM aarch64 -
MIPS
variants of MIPS 32-bit -
MIPS64
variants of MIPS 64-bit -
AVR
Atmel AVR 8-bit microcontroller -
AVR32
Atmel Corporation 32-bit microprocessor family -
PNFDMY1
Reserved - Virtual processor ("PNF DUMMY 1") reserved for internal testing use. -
PNFDMY2
Reserved - Virtual processor ("PNF DUMMY 2") reserved for internal testing use. -
builtinCount
public static final int builtinCountNumber of built-in processor types.
-
-
Constructor Details
-
ProcessorType
-
ProcessorType
-
-
Method Details
-
getFamily
Retrieve the processor family.- Returns:
- processor family
-
ordinal
public int ordinal()Description copied from class:DynamicEnumGet this entry's current ordinal in its dynamic enum.- Specified by:
ordinalin classDynamicEnum<ProcessorType>- Returns:
- current ordinal of this entry
-
count
public static int count()Get number of registered processor types.- Returns:
- number of registered processor types
-
values
Get registered processor types.- Returns:
- registered processor types
-
valueOf
Retrieve a processor type by name.- Parameters:
name- processor type name- Returns:
- matching processor type, or
UNKNOWN
-
valueOf
Retrieve a processor type by id.- Parameters:
id- processor type id- Returns:
- matching processor type, or
UNKNOWN
-
register
Dynamically add a new processor type.- Parameters:
id- use one ofWellKnownProcessorIds; if the list does not contain the wanted processor, check the official UNIX ids (https://www.sco.com/developers/gabi/latest/ch4.eheader.html) and use the appropriate id is possible; for custom or unspecified architectures, use a unique id greater than or equal 65536name- processor namefamily- processor family (optional)- Returns:
- registered processor type
-
unregister
Unregister a dynamic processor type.- Parameters:
name- processor type name- Returns:
- true if the type was unregistered
-
isIntel
public boolean isIntel()Convenience method to perform an X86 family check -
isARM
public boolean isARM()Convenience method to perform an ARM family check -
isMIPS
public boolean isMIPS()Convenience method to perform a MIPS family check -
isAVR
public boolean isAVR()Determine whether this is an AVR processor.- Returns:
- true for AVR processors
-
is64Bit
public boolean is64Bit()Determine whether this is a 64-bit processor.- Returns:
- true for 64-bit processors
-