From 76876d39ba4a9c842786304b8ccf0249fab2999c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 3 Jan 2018 12:41:16 +0100 Subject: Initial implementation of reverse instruction conversion This is rude implementation. We always print all fields. In future we should add flags to set what fields should be hidden on per instruction bases. --- qtmips_machine/instruction.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'qtmips_machine/instruction.h') diff --git a/qtmips_machine/instruction.h b/qtmips_machine/instruction.h index fc8dbf5..6232d3e 100644 --- a/qtmips_machine/instruction.h +++ b/qtmips_machine/instruction.h @@ -6,8 +6,7 @@ namespace machine { -class Instruction : public QObject { - Q_OBJECT +class Instruction { public: Instruction(); Instruction(std::uint32_t inst); @@ -16,8 +15,6 @@ public: Instruction(std::uint8_t opcode, std::uint32_t address); // Type J Instruction(const Instruction&); - QString to_str(); - std::uint8_t opcode() const; std::uint8_t rs() const; std::uint8_t rt() const; @@ -32,6 +29,8 @@ public: bool operator!=(const Instruction &c) const; Instruction &operator=(const Instruction &c); + QString to_str(); + private: std::uint32_t dt; }; -- cgit v1.2.3