Skip to content

Optionally disable increment for program counter #3

Description

@purag

Currently, branch instructions have to do something like this in their eval() function:

ProgramCounter.setValue(ProgramCounter.getValue() + offset);

archsim will still increment the value of the program counter, even if the user sets it. We should allow an "options" object as the second argument to setValue:

ProgramCounter.setValue(ProgramCounter.getValue() + offset, {
  increment: true
});

This gives user finer controls over their architecture, and means no nasty hacks to adjust for the mandatory increment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions