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

Better offsets #6315

Merged
merged 2 commits into from Sep 9, 2022
Merged

Better offsets #6315

merged 2 commits into from Sep 9, 2022

Commits on Sep 9, 2022

  1. Introduce InstructionOffset for AArch64

    There are a lot of instructions on AArch64 where we take an offset
    from PC in terms of the number of instructions. This is for loading
    a value relative to the PC or for jumping.
    
    We were usually accepting an A64Opnd or an i32. It can get
    confusing and inconsistent though because sometimes you would
    divide by 4 to get the number of instructions or multiply by 4 to
    get the number of bytes.
    
    This commit adds a struct that wraps an i32 in order to keep all of
    that logic in one place. It makes it much easier to read and reason
    about how these offsets are getting used.
    kddnewton committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    7026981 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc7bdbc View commit details
    Browse the repository at this point in the history