diff options
author | Karel Kočí <cynerd@email.cz> | 2017-11-19 21:23:04 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-11-19 21:23:04 +0100 |
commit | f0ad502e4651243d6a96194b3393bd460c0f7fc9 (patch) | |
tree | 4f912c24b5943bd93b5a3378df75f9611de6779b /qtmips_machine/instructions/arithmetic.h | |
parent | 2c6562fa78e884d66b8c2a306f020101e8803f2e (diff) | |
download | qtmips-f0ad502e4651243d6a96194b3393bd460c0f7fc9.tar.gz qtmips-f0ad502e4651243d6a96194b3393bd460c0f7fc9.tar.bz2 qtmips-f0ad502e4651243d6a96194b3393bd460c0f7fc9.zip |
Another huge pile of work for about two months
Well I should commit every change instead of this madness. I am not
documenting changes as all this is just improvements and implementation
progression.
Diffstat (limited to 'qtmips_machine/instructions/arithmetic.h')
-rw-r--r-- | qtmips_machine/instructions/arithmetic.h | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/qtmips_machine/instructions/arithmetic.h b/qtmips_machine/instructions/arithmetic.h deleted file mode 100644 index 185ed95..0000000 --- a/qtmips_machine/instructions/arithmetic.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef ARITHMETIC_H -#define ARITHMETIC_H - -#include "instruction.h" - -enum InstructionArithmeticT { - IAT_ADD, // Add - IAT_ADDU, // Add unsigned - IAT_SUB, // Subtract - IAT_SUBU, // Subtract unsigned - IAT_AND, - IAT_OR, - IAT_XOR, - IAT_NOR, - IAT_SLT, // set on less than - IAT_SLTU, // set on less than unsigned -}; - -class InstructionArithmetic : public InstructionR { -public: - InstructionArithmetic(enum InstructionArithmeticT type, std::uint8_t rs, std::uint8_t rd, std::uint8_t rt); - - void decode(Registers *regs); - void execute(); - void memory(Memory *mem); - void write_back(Registers *regs); - - QVector<QString> to_strs(); -private: - enum InstructionArithmeticT type; - std::uint32_t rs_d, rd_d, rt_d; -}; - -enum InstructionArithmeticImmediateT { - IAT_ADDI, - IAT_ADDIU, - IAT_ANDI, - IAT_ORI, - IAT_XORI, - IAT_SLTI, - IAT_SLTIU, - IAT_LUI -}; - -class InstructionArithmeticImmediate : public InstructionI { -public: - InstructionArithmeticImmediate(enum InstructionArithmeticImmediateT type, std::uint8_t rs, std::uint8_t rt, std::uint16_t value); - - void decode(Registers *regs); - void execute(); - void memory(Memory *mem); - void write_back(Registers *regs); - - QVector<QString> to_strs(); -private: - enum InstructionArithmeticImmediateT type; - std::uint32_t rs_d, rt_d; -}; - -#endif // ARITHMETIC_H |