From 55e1bc746a45118e14554c957b4ee4663039d9af Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 3 Feb 2019 11:52:53 +0100 Subject: Implement BREAK instruction to stop continuous execution. Signed-off-by: Pavel Pisa --- qtmips_machine/alu.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qtmips_machine/alu.cpp') diff --git a/qtmips_machine/alu.cpp b/qtmips_machine/alu.cpp index bb3a745..49c41a3 100644 --- a/qtmips_machine/alu.cpp +++ b/qtmips_machine/alu.cpp @@ -35,6 +35,8 @@ std::uint32_t machine::alu_operate(enum AluOp operation, std::uint32_t s, std::u case ALU_OP_MOVN: // Same note as for MOVZ applies here return t != 0 ? s : 0; + case ALU_OP_BREAK: + return 0; case ALU_OP_MFHI: return regs->read_hi_lo(true); case ALU_OP_MTHI: -- cgit v1.2.3