From 675ede8c34671415bc423e6360ffe0de12d49ec8 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 5 Mar 2019 00:57:02 +0100 Subject: Dock to view coprocessor 0 and cop0 counter/comparator support. Signed-off-by: Pavel Pisa --- qtmips_machine/core.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qtmips_machine/core.cpp') diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp index 351ffb0..2ba8d34 100644 --- a/qtmips_machine/core.cpp +++ b/qtmips_machine/core.cpp @@ -160,6 +160,10 @@ bool Core::handle_exception(Core *core, Registers *regs, ExceptionCause excause, void Core::set_c0_userlocal(std::uint32_t address) { hwr_userlocal = address; + if (cop0state != nullptr) { + if (address != cop0state->read_cop0reg(Cop0State::UserLocal)) + cop0state->write_cop0reg(Cop0State::UserLocal, address); + } } enum ExceptionCause Core::memory_special(enum AccessControl memctl, -- cgit v1.2.3