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/instruction.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'qtmips_machine/instruction.h') diff --git a/qtmips_machine/instruction.h b/qtmips_machine/instruction.h index 3b76fba..921d9b0 100644 --- a/qtmips_machine/instruction.h +++ b/qtmips_machine/instruction.h @@ -1,14 +1,18 @@ #ifndef INSTRUCTION_H #define INSTRUCTION_H +#include #include -class Instruction { +class Instruction : public QObject { + Q_OBJECT public: + Instruction(); Instruction(std::uint32_t inst); Instruction(std::uint8_t opcode, std::uint8_t rs, std::uint8_t rt, std::uint8_t rd, std::uint8_t shamt, std::uint8_t funct); // Type R Instruction(std::uint8_t opcode, std::uint8_t rs, std::uint8_t rt, std::uint16_t immediate); // Type I Instruction(std::uint8_t opcode, std::uint32_t address); // Type J + Instruction(const Instruction&); QString to_str(); @@ -28,4 +32,6 @@ private: std::uint32_t dt; }; +Q_DECLARE_METATYPE(Instruction) + #endif // INSTRUCTION_H -- cgit v1.2.3