microprobe.target.isa.GenericISA

class GenericISA(name: str, descr: str, path: str, ins: Dict[str, 'InstructionType'], regs: Dict[str, 'Register'], comparators, generators)[source]

Bases: ISA

Class to represent a generic Instruction Set Architecture (ISA).

__init__(name: str, descr: str, path: str, ins: Dict[str, 'InstructionType'], regs: Dict[str, 'Register'], comparators, generators)[source]
Parameters:
  • name

  • descr

  • ins

  • regs

  • comparators

  • generators

Methods

__init__(name, descr, path, ins, regs, ...)

param name:

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, complete])

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, complete])

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

ISA name (str).

property description

ISA description (str).

property path

Path to definition (str).

property address_registers
property float_registers
property flag_registers
property instructions

ISA instructions (dict mapping strings to InstructionType).

property scratch_var
property registers
property target

Associated target object (Target).

normalize_asm(mnemonic, operands)[source]
set_target(target: Target)[source]
Parameters:

target

new_instruction(name: str)[source]
Parameters:

name

full_report()[source]
set_register(reg: Register, value, context: Context)[source]
Parameters:
  • reg

  • value

  • context

property scratch_registers
property control_registers
get_register_for_address_arithmetic(context: Context)[source]
Parameters:

context

get_register_for_float_arithmetic(context: Context)[source]
Parameters:

context

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

  • value

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

  • target

branch_to_itself()[source]
get_dat(**kwargs)[source]
set_context(variable=None, tmpl_path=None, complete=False)[source]
get_context(variable=None, tmpl_path=None, complete: bool = False)[source]
register_value_comparator(comp)[source]
randomize_register(register: Register, seed=None)[source]
compare_and_branch(val1, val2, cond, target, context: Context)
Parameters:
  • val1

  • val2

  • cond

  • target

  • context

property context_var
load(reg: Register, address, context: Context)
Parameters:
  • reg

  • address

  • context

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

  • address

  • context

negate_register(reg: Register, context: Context)
Parameters:
  • reg

  • context

nop()
set_register_bits(register, value, mask, shift, context: Context)
Parameters:
  • register

  • value

  • mask

  • shift

  • context

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

  • address

  • context

  • force_absolute – (Default value = False)

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

  • length

  • value

  • context

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

  • address

  • context

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

  • address

  • length

  • context