aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/core.cpp8
-rw-r--r--qtmips_machine/core.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp
index 88b2fe2..96ae0ad 100644
--- a/qtmips_machine/core.cpp
+++ b/qtmips_machine/core.cpp
@@ -72,10 +72,14 @@ void Core::reset() {
do_reset();
}
-unsigned Core::cycles() {
+unsigned Core::cycles() const {
return cycle_c;
}
+unsigned Core::stalls() const {
+ return stall_c;
+}
+
Registers *Core::get_regs() {
return regs;
}
@@ -935,7 +939,7 @@ bool StopExceptionHandler::handle_exception(Core *core, Registers *regs,
(unsigned long)regs->read_pc(), (unsigned long)mem_ref_addr);
#else
(void)excause; (void)inst_addr; (void)next_addr; (void)mem_ref_addr; (void)regs;
- (void)jump_branch_pc; (void)in_delay_slot;
+ (void)jump_branch_pc; (void)in_delay_slot, (void)core;
#endif
return true;
};
diff --git a/qtmips_machine/core.h b/qtmips_machine/core.h
index ff589c5..fd15315 100644
--- a/qtmips_machine/core.h
+++ b/qtmips_machine/core.h
@@ -76,7 +76,8 @@ public:
void step(bool skip_break = false); // Do single step
void reset(); // Reset core (only core, memory and registers has to be reseted separately)
- unsigned cycles(); // Returns number of executed cycles
+ unsigned cycles() const; // Returns number of executed cycles
+ unsigned stalls() const; // Returns number of stall cycles
Registers *get_regs();
Cop0State *get_cop0state();