diff options
author | Karel Kočí <cynerd@email.cz> | 2017-11-21 22:37:59 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-11-21 22:37:59 +0100 |
commit | c4efaa81d4bf498c721db5cdbf932e7a3bcb0cae (patch) | |
tree | adffb9dfb4b0d020aa68484bca961c8f3083e5f7 /qtmips_machine/instruction.cpp | |
parent | cd9e572b6523fac483ce1695ae1785fca075cc53 (diff) | |
download | qtmips-c4efaa81d4bf498c721db5cdbf932e7a3bcb0cae.tar.gz qtmips-c4efaa81d4bf498c721db5cdbf932e7a3bcb0cae.tar.bz2 qtmips-c4efaa81d4bf498c721db5cdbf932e7a3bcb0cae.zip |
Implement tests for few more arithmetic instructions
Diffstat (limited to 'qtmips_machine/instruction.cpp')
-rw-r--r-- | qtmips_machine/instruction.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp index 91bd1c8..58b6ffa 100644 --- a/qtmips_machine/instruction.cpp +++ b/qtmips_machine/instruction.cpp @@ -109,6 +109,10 @@ std::uint32_t Instruction::data() const { return this->dt; } -bool Instruction::operator ==(const Instruction &c) const { +bool Instruction::operator==(const Instruction &c) const { return (this->data() == c.data()); } + +bool Instruction::operator!=(const Instruction &c) const { + return ! this->operator==(c); +} |