From f0ad502e4651243d6a96194b3393bd460c0f7fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Nov 2017 21:23:04 +0100 Subject: Another huge pile of work for about two months Well I should commit every change instead of this madness. I am not documenting changes as all this is just improvements and implementation progression. --- qtmips_machine/registers.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'qtmips_machine/registers.h') diff --git a/qtmips_machine/registers.h b/qtmips_machine/registers.h index a550f4a..905a212 100644 --- a/qtmips_machine/registers.h +++ b/qtmips_machine/registers.h @@ -8,18 +8,22 @@ class Registers : public QObject { Q_OBJECT public: Registers(); + Registers(const Registers*); - std::uint32_t read_pc(); // Return current value of program counter + std::uint32_t read_pc() const; // Return current value of program counter std::uint32_t pc_inc(); // Increment program counter by four bytes std::uint32_t pc_jmp(std::int32_t offset); // Relative jump from current location in program counter void pc_abs_jmp(std::uint32_t address); // Absolute jump in program counter (write to pc) - std::uint32_t read_gp(std::uint8_t i); // Read general-purpose register + std::uint32_t read_gp(std::uint8_t i) const; // Read general-purpose register void write_gp(std::uint8_t i, std::uint32_t value); // Write general-purpose register - std::uint32_t read_hi_lo(bool hi); // true - read HI / false - read LO + std::uint32_t read_hi_lo(bool hi) const; // true - read HI / false - read LO void write_hi_lo(bool hi, std::uint32_t value); + bool operator ==(const Registers &c) const; + signals: + void pc_update(std::uint32_t val); // TODO signals private: -- cgit v1.2.3