Skip to content

Refactor control flow in emulator and processor framework - #245

Merged
mnemonikr merged 2 commits into
mainfrom
control-flow
Aug 29, 2026
Merged

Refactor control flow in emulator and processor framework#245
mnemonikr merged 2 commits into
mainfrom
control-flow

Conversation

@mnemonikr

Copy link
Copy Markdown
Owner

This is a decently sized refactoring that does the following:

  • Replaces the emulator ControlFlow enum with the std::ops::ControlFlow enum instead.
  • Eliminates the PcodeEmulator trait and renames StandardPcodeEmulator to PcodeEmulator
  • Moves Halt control flow from the emulator to the processor framework
  • Processors no longer define custom emulators, but instead attach a custom EmulatorHandler that can run both before and after the emulator. Kernel invocations are implemented with this framework now.

There are still some language or other stale references to the old model. For example, both aarch and x86 architectures define emulator.rs as if they are implementing emulators, but instead are now implementing emulator handlers. Leaving this for now.

@mnemonikr
mnemonikr merged commit d0e661a into main Aug 29, 2026
2 checks passed
@mnemonikr
mnemonikr deleted the control-flow branch August 29, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant