microprobe.target.isa.ISA

class ISA[source]

Bases: ABC

Abstract class to represent an Instruction Set Architecture (ISA).

An instruction set architecture (ISA) object defines the part of the computer architecture related to programming, including instructions, registers, operands, memory operands, etc.

__init__()[source]

Methods

__init__()

add_to_register(register, value)

param register:

branch_to_itself()

branch_unconditional_relative(source, target)

param source:

compare_and_branch(val1, val2, cond, target, ...)

param val1:

full_report()

get_context([variable, tmpl_path])

get_dat(**kwargs)

get_register_for_address_arithmetic(context)

param context:

get_register_for_float_arithmetic(context)

param context:

load(reg, address, context)

param reg:

load_float(reg, address, context)

param reg:

negate_register(reg, context)

param reg:

new_instruction(name)

param name:

nop()

normalize_asm(mnemonic, operands)

randomize_register(register[, seed])

register_value_comparator(comp)

set_context([variable, tmpl_path])

set_register(reg, value, context)

param reg:

set_register_bits(register, value, mask, ...)

param register:

set_register_to_address(reg, address, context)

param reg:

set_target(target)

param target:

store_decimal(address, length, value, context)

param address:

store_float(reg, address, context)

param reg:

store_integer(reg, address, length, context)

param reg:

Attributes

address_registers

context_var

control_registers

description

ISA description (str).

flag_registers

float_registers

instructions

ISA instructions (dict mapping strings to InstructionType).

name

ISA name (str).

path

Path to definition (str).

registers

scratch_registers

scratch_var

target

Associated target object (Target).




property name: str

ISA name (str).

property description: str

ISA description (str).

property path: str

Path to definition (str).

property instructions: Dict[str, 'InstructionType']

ISA instructions (dict mapping strings to InstructionType).

property target: Target

Associated target object (Target).

property registers: Dict[str, Register]
property scratch_registers: List[Register]
property address_registers: List[Register]
property float_registers: List[Register]
property control_registers: List[Register]
property scratch_var: Variable
property context_var
full_report()[source]
set_register(reg: Register, value, context: Context)[source]
Parameters:
  • reg

  • value

  • context

negate_register(reg: Register, context: Context)[source]
Parameters:
  • reg

  • context

load(reg: Register, address, context: Context)[source]
Parameters:
  • reg

  • address

  • context

load_float(reg: Register, address, context: Context)[source]
Parameters:
  • reg

  • address

  • context

store_float(reg: Register, address, context: Context)[source]
Parameters:
  • reg

  • address

  • context

store_integer(reg: Register, address, length, context: Context)[source]
Parameters:
  • reg

  • address

  • length

  • context

store_decimal(address, length, value, context: Context)[source]
Parameters:
  • address

  • length

  • value

  • context

set_register_to_address(reg: Register, address, context: Context, force_absolute: bool = False, force_relative: bool = False)[source]
Parameters:
  • reg

  • address

  • context

  • force_absolute – (Default value = False)

get_register_for_address_arithmetic(context: Context)[source]
Parameters:

context

get_register_for_float_arithmetic(context: Context)[source]
Parameters:

context

set_register_bits(register, value, mask, shift, context: Context)[source]
Parameters:
  • register

  • value

  • mask

  • shift

  • context

new_instruction(name: str)[source]
Parameters:

name

set_target(target: Target)[source]
Parameters:

target

add_to_register(register: Register, value)[source]
Parameters:
  • register

  • value

branch_unconditional_relative(source, target: Target)[source]
Parameters:
  • source

  • target

branch_to_itself()[source]
compare_and_branch(val1, val2, cond, target, context: Context)[source]
Parameters:
  • val1

  • val2

  • cond

  • target

  • context

nop()[source]
property flag_registers
get_dat(**kwargs)[source]
set_context(variable=None, tmpl_path=None)[source]
get_context(variable=None, tmpl_path=None)[source]
register_value_comparator(comp)[source]
normalize_asm(mnemonic, operands)[source]
randomize_register(register, seed=None)[source]