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_unconditional_relative
(source, target)- param source:
compare_and_branch
(val1, val2, cond, target, ...)- param val1:
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])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
ISA description (
str
).ISA instructions (
dict
mapping strings toInstructionType
).ISA name (
str
).Path to definition (
str
).Associated target object (
Target
).
- property address_registers
- property float_registers
- property flag_registers
- property instructions
ISA instructions (
dict
mapping strings toInstructionType
).
- property scratch_var
- property registers
- property scratch_registers
- property control_registers
- compare_and_branch(val1, val2, cond, target, context: Context)
- Parameters:
val1
val2
cond
target
context
- property context_var
- nop()
- set_register_bits(register, value, mask, shift, context: Context)
- Parameters:
register
value
mask
shift
context