aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/registers.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-12-15 22:45:28 +0100
committerKarel Kočí <cynerd@email.cz>2017-12-15 22:45:28 +0100
commite6ca4b4568e311b47239bfe83de15ed9e91c57b9 (patch)
tree3da2f72faf360058bae02c35b0c724233bd64d61 /qtmips_machine/registers.cpp
parentbbea996112eb7ac81ec50d2af08f4bd681d0e50d (diff)
downloadqtmips-e6ca4b4568e311b47239bfe83de15ed9e91c57b9.tar.gz
qtmips-e6ca4b4568e311b47239bfe83de15ed9e91c57b9.tar.bz2
qtmips-e6ca4b4568e311b47239bfe83de15ed9e91c57b9.zip
Implement few initial graphic elements
Diffstat (limited to 'qtmips_machine/registers.cpp')
-rw-r--r--qtmips_machine/registers.cpp3
1 files changed, 3 insertions, 0 deletions
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 {