History

Update registers struct to include next_pc member. This allows the pc member to always point at the current PC instead of having been incremented to the 'next' PC.

arr committed 9 years ago

Commit a46f30c1 parent 87f2d5b6 files · +67 −68Browse files

Showing the changes to src/include (2 of 6 files). Show all

Unified · Split

2 files
  1. src/include/exceptions.h +1 −1
  2. src/include/runtime.h +2 −1
src/include/exceptions.h+1−1
@@ -36,7 +36,7 @@ namespace disvm · 35 unmodified lines
3636 { }
3737 };
3838
39− class vm_syscall_exception : public vm_system_exception
39+ class vm_syscall_exception final : public vm_system_exception
4040 {
4141 public:
4242 explicit vm_syscall_exception(disvm::vm_t &vm, const char *message)
src/include/runtime.h+2−1
@@ -745,7 +745,8 @@ namespace disvm · 744 unmodified lines
745745 const vm_thread_t &thread;
746746 std::atomic<vm_tool_dispatch_t *> tool_dispatch;
747747 vm_stack_t stack; // Frame pointer access (FP)
748− vm_pc_t pc; // Program counter (Index into module code section)
748+ vm_pc_t pc; // Current Program counter (Index into module code section)
749+ vm_pc_t next_pc; // Next Program counter
749750 vm_alloc_t *mp_base; // Module data base pointer (MP)
750751 vm_module_ref_t *module_ref; // Module reference
751752 vm_request_mutex_t request_mutex;