From f47d44c1516280081a84b3d693014e0b63e5a634 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 14 Sep 2019 14:41:41 +1000 Subject: [PATCH] CPU: Implement break instruction --- src/pse/cpu_core.cpp | 6 ++++++ src/pse/cpu_disasm.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pse/cpu_core.cpp b/src/pse/cpu_core.cpp index 25606f444..e3463f298 100644 --- a/src/pse/cpu_core.cpp +++ b/src/pse/cpu_core.cpp @@ -519,6 +519,12 @@ void Core::ExecuteInstruction(Instruction inst) } break; + case InstructionFunct::break_: + { + RaiseException(Exception::BP); + } + break; + default: UnreachableCode(); break; diff --git a/src/pse/cpu_disasm.cpp b/src/pse/cpu_disasm.cpp index ba545b4d1..051a11afb 100644 --- a/src/pse/cpu_disasm.cpp +++ b/src/pse/cpu_disasm.cpp @@ -107,7 +107,7 @@ static const std::array s_special_table = {{ "UNKNOWN", // 10 "UNKNOWN", // 11 "syscall", // 12 - "UNKNOWN", // 13 + "break", // 13 "UNKNOWN", // 14 "UNKNOWN", // 15 "mfhi $rd", // 16