Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/asm: assembly parser label fixes #20210

Merged
merged 3 commits into from
Oct 29, 2019
Merged

Commits on Oct 28, 2019

  1. core/asm: Fix encoding of pushed labels

    EVM uses big-endian byte-order, so to pad a label value to 4 bytes,
    zeros must be added to the front, not the end.
    michaelforney committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    422067a View commit details
    Browse the repository at this point in the history
  2. core/asm: Fix PC calculations when a label is pushed

    Incrementing PC by 5 is only correct if the label appears after a jump,
    in which case there is an implicit push. When it appears after an explicit
    push, PC should only be incremented by 4.
    michaelforney committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    7c35300 View commit details
    Browse the repository at this point in the history
  3. core/asm: Allow JUMP with no argument

    This way, a label can be pushed explicitly, or loaded from memory to
    implement a jump table.
    michaelforney committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    6ee86f8 View commit details
    Browse the repository at this point in the history