aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/alu.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-11-21 19:48:51 +0100
committerKarel Kočí <cynerd@email.cz>2017-11-21 19:48:51 +0100
commit499a88621d12ff0cdcba1f8c796b7031d6adc649 (patch)
treec050b5224c896b3e14d74866473aef9c2a5e9b69 /qtmips_machine/alu.h
parent68f2af6801756980ec53347c0acb7fcc292f7939 (diff)
downloadqtmips-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/alu.h')
-rw-r--r--qtmips_machine/alu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/qtmips_machine/alu.h b/qtmips_machine/alu.h
index 974b462..2e30ee9 100644
--- a/qtmips_machine/alu.h
+++ b/qtmips_machine/alu.h
@@ -3,6 +3,7 @@
#include <cstdint>
#include <QString>
+#include <QObject>
// TODO Any other operations? We seems to be missing a lot of them.
enum AluOp : std::uint8_t {
@@ -36,4 +37,6 @@ std::uint32_t alu_operate(enum AluOp operation, std::uint32_t s, std::uint32_t t
// Returns string representation of ALU instruction (internally used by Instruction::to_str)
QString alu_str(enum AluOp operation, std::uint32_t s, std::uint32_t t, std::uint8_t sa);
+Q_DECLARE_METATYPE(AluOp)
+
#endif // ALU_H