diff options
author | Karel Kočí <cynerd@email.cz> | 2017-11-21 19:48:51 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-11-21 19:48:51 +0100 |
commit | 499a88621d12ff0cdcba1f8c796b7031d6adc649 (patch) | |
tree | c050b5224c896b3e14d74866473aef9c2a5e9b69 /qtmips_machine/registers.cpp | |
parent | 68f2af6801756980ec53347c0acb7fcc292f7939 (diff) | |
download | qtmips-499a88621d12ff0cdcba1f8c796b7031d6adc649.tar.gz qtmips-499a88621d12ff0cdcba1f8c796b7031d6adc649.tar.bz2 qtmips-499a88621d12ff0cdcba1f8c796b7031d6adc649.zip |
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.
Diffstat (limited to 'qtmips_machine/registers.cpp')
-rw-r--r-- | qtmips_machine/registers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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 { |