aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/qtmipsmachine.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 18:14:53 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 18:14:53 +0100
commit71e2e98d07499c6d0f31596fec52cd8cef5813a9 (patch)
treed2aa2729956464f2aab62bb5f088850b69a5a8d7 /qtmips_machine/qtmipsmachine.cpp
parent1a3fbaf22975b1f130998841adb3109b8a543513 (diff)
downloadqtmips-71e2e98d07499c6d0f31596fec52cd8cef5813a9.tar.gz
qtmips-71e2e98d07499c6d0f31596fec52cd8cef5813a9.tar.bz2
qtmips-71e2e98d07499c6d0f31596fec52cd8cef5813a9.zip
Implement machine restart
Diffstat (limited to 'qtmips_machine/qtmipsmachine.cpp')
-rw-r--r--qtmips_machine/qtmipsmachine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp
index 744c5e2..1d7523c 100644
--- a/qtmips_machine/qtmipsmachine.cpp
+++ b/qtmips_machine/qtmipsmachine.cpp
@@ -110,7 +110,12 @@ void QtMipsMachine::step() {
}
void QtMipsMachine::restart() {
- // TODO
+ pause();
+ regs->reset();
+ mem->reset(*mem_program_only);
+ // TODO cache
+ cr->reset();
+ set_status(ST_READY);
}
void QtMipsMachine::set_status(enum Status st) {