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
36 { }36 { }
37 };37 };
38 38
39 class vm_syscall_exception : public vm_system_exception39 class vm_syscall_exception final : public vm_system_exception
40 {40 {
41 public:41 public:
42 explicit vm_syscall_exception(disvm::vm_t &vm, const char *message)42 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
745 const vm_thread_t &thread;745 const vm_thread_t &thread;
746 std::atomic<vm_tool_dispatch_t *> tool_dispatch;746 std::atomic<vm_tool_dispatch_t *> tool_dispatch;
747 vm_stack_t stack; // Frame pointer access (FP)747 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
749 vm_alloc_t *mp_base; // Module data base pointer (MP)750 vm_alloc_t *mp_base; // Module data base pointer (MP)
750 vm_module_ref_t *module_ref; // Module reference751 vm_module_ref_t *module_ref; // Module reference
751 vm_request_mutex_t request_mutex;752 vm_request_mutex_t request_mutex;