Skip to content

architecture.py

ofrak_type.architecture

ArchInfo dataclass

Collection of fields used to describe an architecture

Attributes:

Name Type Description
isa InstructionSet

Instruction set architecture

sub_isa Optional[ofrak_type.architecture.SubInstructionSet]

Sub instruction set

bit_width BitWidth

Bits per word

endianness Endianness

Endianness as Endianness.BIG_ENDIAN or Endianness.LITTLE_ENDIAN

processor Optional[ofrak_type.architecture.ProcessorType]

Processor type

InstructionSet (Enum)

Enumeration of the possible supported instruction sets.

Attributes:

Name Type Description
ARM

ARM

AARCH64

ARM 64-bit

X86

Intel x86

MIPS

MIPS

MSP430

MSP430

PPS

PowerPC

M68K

Motorola 68K

AVR

Atmel AVR

SPARC

SPARC

InstructionSetMode (Enum)

Instruction set mode. Useful for architectures which have multiple encodings it can switch between on the fly. In particular the Thumb mode for ARM and VLE more for PPC are represented.

Attributes:

Name Type Description
NONE

None

THUMB

Thumb (ARM)

VLE

VLE (PPC)

ProcessorType (Enum)

Enumeration of specific processor types.

Attributes:

Name Type Description
ARM926EJ_S
GENERIC_A53_V8
GENERIC_A9_V6
GENERIC_A9_V7
GENERIC_A9_V7_THUMB
MSP430
MIPS_LITTLE
MIPS_RM5721_BIG
PPC_405
PPC_MPC855T
PPC_VLE
PI_ARM6
PIXHAWK
SPARTAN
X186_16
X186_32
X64
XSCALE
COLDFIRE4E
CORTEX_A53
AVR
SPARC

SubInstructionSet (Enum)

ARM sub instruction set. Different sub ISAs correspond to different ARM versions.