aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/core.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-05 00:57:02 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-05 00:57:02 +0100
commit675ede8c34671415bc423e6360ffe0de12d49ec8 (patch)
tree5d33ca19a47bd4f35303176d102e1b27310da472 /qtmips_machine/core.cpp
parent73886d9d1733368fe3c876c8e613ba5821e12944 (diff)
downloadqtmips-675ede8c34671415bc423e6360ffe0de12d49ec8.tar.gz
qtmips-675ede8c34671415bc423e6360ffe0de12d49ec8.tar.bz2
qtmips-675ede8c34671415bc423e6360ffe0de12d49ec8.zip
Dock to view coprocessor 0 and cop0 counter/comparator support.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
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,