riscemu.Registers module

RiscEmu (c) 2021 Anton Lydike

SPDX-License-Identifier: MIT

class riscemu.Registers.Registers(conf: riscemu.Config.RunConfig)

Bases: object

Represents a bunch of registers

__init__(conf: riscemu.Config.RunConfig)

Initialize the register configuration, respecting the RunConfig conf :param conf: The RunConfig

dump(full=False)

Dump all registers to stdout :param full: If True, floating point registers are dumped too

dump_reg_a()

Dump the a registers

set(reg, val, mark_set=True)bool

Set a register content to val :param reg: The register to set :param val: The new value :param mark_set: If True, marks this register as “last accessed” (only used internally) :return: If the operation was successful

get(reg, mark_read=True)

Retuns the contents of register reg :param reg: The register name :param mark_read: If the register should be markes as “last read” (only used internally) :return: The contents of register reg

static all_registers()

Return a list of all valid registers :return: The list

static named_registers()

Return all named registers :return: The list