aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/core.cpp6
-rw-r--r--qtmips_machine/core.h2
-rw-r--r--qtmips_machine/qtmipsmachine.cpp4
-rw-r--r--qtmips_machine/qtmipsmachine.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp
index 68dbe0b..7c92949 100644
--- a/qtmips_machine/core.cpp
+++ b/qtmips_machine/core.cpp
@@ -83,7 +83,7 @@ Core::hwBreak::hwBreak(std::uint32_t addr) {
count = 0;
}
-void Core::inser_hwbreak(std::uint32_t address) {
+void Core::insert_hwbreak(std::uint32_t address) {
hw_breaks.insert(address, new hwBreak(address));
}
@@ -118,9 +118,9 @@ bool Core::handle_exception(Core *core, Registers *regs, ExceptionCause excause,
{
if (excause == EXCAUSE_HWBREAK) {
if (in_delay_slot)
- regs->pc_abs_jmp(inst_addr);
- else
regs->pc_abs_jmp(jump_branch_pc);
+ else
+ regs->pc_abs_jmp(inst_addr);
}
ExceptionHandler *exhandler = ex_handlers.value(excause);
diff --git a/qtmips_machine/core.h b/qtmips_machine/core.h
index 88d0e9b..bd62f52 100644
--- a/qtmips_machine/core.h
+++ b/qtmips_machine/core.h
@@ -81,7 +81,7 @@ public:
MemoryAccess *get_mem_data();
MemoryAccess *get_mem_program();
void register_exception_handler(ExceptionCause excause, ExceptionHandler *exhandler);
- void inser_hwbreak(std::uint32_t address);
+ void insert_hwbreak(std::uint32_t address);
void remove_hwbreak(std::uint32_t address);
bool is_hwbreak(std::uint32_t address);
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp
index f846ed2..23a83d3 100644
--- a/qtmips_machine/qtmipsmachine.cpp
+++ b/qtmips_machine/qtmipsmachine.cpp
@@ -206,9 +206,9 @@ void QtMipsMachine::register_exception_handler(ExceptionCause excause,
cr->register_exception_handler(excause, exhandler);
}
-void QtMipsMachine::inser_hwbreak(std::uint32_t address) {
+void QtMipsMachine::insert_hwbreak(std::uint32_t address) {
if (cr != nullptr)
- cr->inser_hwbreak(address);
+ cr->insert_hwbreak(address);
}
void QtMipsMachine::remove_hwbreak(std::uint32_t address) {
diff --git a/qtmips_machine/qtmipsmachine.h b/qtmips_machine/qtmipsmachine.h
index 82245ff..de5275a 100644
--- a/qtmips_machine/qtmipsmachine.h
+++ b/qtmips_machine/qtmipsmachine.h
@@ -78,7 +78,7 @@ public:
bool exited();
void register_exception_handler(ExceptionCause excause, ExceptionHandler *exhandler);
- void inser_hwbreak(std::uint32_t address);
+ void insert_hwbreak(std::uint32_t address);
void remove_hwbreak(std::uint32_t address);
bool is_hwbreak(std::uint32_t address);