From e6ca4b4568e311b47239bfe83de15ed9e91c57b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 15 Dec 2017 22:45:28 +0100 Subject: Implement few initial graphic elements --- qtmips_machine/registers.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qtmips_machine/registers.cpp') diff --git a/qtmips_machine/registers.cpp b/qtmips_machine/registers.cpp index a18421e..b77b1b7 100644 --- a/qtmips_machine/registers.cpp +++ b/qtmips_machine/registers.cpp @@ -44,6 +44,7 @@ void Registers::pc_abs_jmp(std::uint32_t address) { if (address % 4) throw QTMIPS_EXCEPTION(UnalignedJump, "Trying to jump to unaligned address", QString::number(address, 16)); this->pc = address; + emit pc_update(this->pc); } void Registers::pc_abs_jmp_28(std::uint32_t address) { @@ -61,6 +62,7 @@ void Registers::write_gp(std::uint8_t i, std::uint32_t value) { SANITY_ASSERT(i < 32, QString("Trying to write to register ") + QString(i)); if (i == 0) // Skip write to $0 return; + emit gp_update(i, value); this->gp[i - 1] = value; } @@ -76,6 +78,7 @@ void Registers::write_hi_lo(bool hi, std::uint32_t value) { this->hi = value; else this->lo = value; + emit hi_lo_update(hi, value); } bool Registers::operator==(const Registers &c) const { -- cgit v1.2.3