aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/instructions/shift.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/instructions/shift.h')
-rw-r--r--qtmips_machine/instructions/shift.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/qtmips_machine/instructions/shift.h b/qtmips_machine/instructions/shift.h
new file mode 100644
index 0000000..9ce29e0
--- /dev/null
+++ b/qtmips_machine/instructions/shift.h
@@ -0,0 +1,28 @@
+#ifndef SHIFT_H
+#define SHIFT_H
+
+#include "instruction.h"
+
+enum InstructionShiftT {
+ IST_LL, // Left logical
+ IST_RL, // Right logical
+ IST_RA // Right arithmetic
+};
+
+class InstructionShift : public InstructionR {
+public:
+ InstructionShift(enum InstructionShiftT type, std::uint8_t rt, std::uint8_t rd, std::uint8_t sa);
+ std::vector<std::string> to_strs();
+private:
+ enum InstructionShiftT type;
+};
+
+class InstructionShiftVariable : public InstructionR {
+public:
+ InstructionShiftVariable(enum InstructionShiftT type, std::uint8_t rs, std::uint8_t rt, std::uint8_t rd);
+ std::vector<std::string> to_strs();
+private:
+ enum InstructionShiftT type;
+};
+
+#endif // SHIFT_H