aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/core.cpp')
-rw-r--r--qtmips_machine/core.cpp4
1 files changed, 4 insertions, 0 deletions
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,