aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/instruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/instruction.cpp')
-rw-r--r--qtmips_machine/instruction.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp
index 7feebd3..0ca7b24 100644
--- a/qtmips_machine/instruction.cpp
+++ b/qtmips_machine/instruction.cpp
@@ -1,4 +1,5 @@
#include "instruction.h"
+#include "alu.h"
#include "qtmipsexception.h"
using namespace machine;
@@ -108,7 +109,7 @@ static const struct AluInstructionMap alu_instruction_map[] = {
{"MOVZ"},
{"MOVN"},
AIM_UNKNOWN,
- AIM_UNKNOWN,
+ {"BREAK"},
AIM_UNKNOWN,
AIM_UNKNOWN,
{"MFHI"},
@@ -231,6 +232,10 @@ bool Instruction::is_store() const {
return im.is_store;
}
+bool Instruction::is_break() const {
+ return opcode() == 0 && funct() == ALU_OP_BREAK;
+}
+
bool Instruction::operator==(const Instruction &c) const {
return (this->data() == c.data());
}