diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-03 11:52:53 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-03 11:52:53 +0100 |
commit | 55e1bc746a45118e14554c957b4ee4663039d9af (patch) | |
tree | af416cb8dd60f47f47b6d9b943a53fe069543cdb /qtmips_machine/alu.cpp | |
parent | 53c75d278a958e40b9c0b0ca3b04cfb11f356827 (diff) | |
download | qtmips-55e1bc746a45118e14554c957b4ee4663039d9af.tar.gz qtmips-55e1bc746a45118e14554c957b4ee4663039d9af.tar.bz2 qtmips-55e1bc746a45118e14554c957b4ee4663039d9af.zip |
Implement BREAK instruction to stop continuous execution.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/alu.cpp')
-rw-r--r-- | qtmips_machine/alu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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: |