From 71e2e98d07499c6d0f31596fec52cd8cef5813a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 5 Jan 2018 18:14:53 +0100 Subject: Implement machine restart --- qtmips_machine/qtmipsmachine.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qtmips_machine/qtmipsmachine.cpp') 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) { -- cgit v1.2.3