From 499a88621d12ff0cdcba1f8c796b7031d6adc649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 21 Nov 2017 19:48:51 +0100 Subject: Add possibility to compare memory and registers state For core testing we want to compare whole memory and registers. Registers are pretty simple but in case of memory it is some what more complicated and required its own tests to be sure that it works. --- qtmips_machine/registers.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qtmips_machine/registers.cpp') diff --git a/qtmips_machine/registers.cpp b/qtmips_machine/registers.cpp index fa984fb..6b4ddd3 100644 --- a/qtmips_machine/registers.cpp +++ b/qtmips_machine/registers.cpp @@ -14,12 +14,12 @@ Registers::Registers() { this->hi = this->lo = 0; } -Registers::Registers(const Registers *orig) : Registers() { - this->pc = orig->read_pc(); +Registers::Registers(const Registers &orig) : Registers() { + this->pc = orig.read_pc(); for (int i = 0; i < 31; i++) - this->gp[i] = orig->read_gp(i); - this->lo = orig->read_hi_lo(false); - this->hi = orig->read_hi_lo(true); + this->gp[i] = orig.read_gp(i); + this->lo = orig.read_hi_lo(false); + this->hi = orig.read_hi_lo(true); } std::uint32_t Registers::read_pc() const { -- cgit v1.2.3