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

Handle address translation for misaligned loads and stores better #467

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 29, 2024

  1. Handle address translation for misaligned loads and stores better

    Refactor the LOAD and STORE instruction so they split misaligned
    accesses into multiple sub-accesses and perform address translation
    separately. This means we should handle the case where a misaligned
    access straddles a page boundary in a sensible way, even if we don't
    yet cover the full range of possibilities allowed for any RISC-V
    implementation.
    
    There are options for the order in which misaligned happen, i.e. from
    high-to-low or from low-to-high as well as the granularity of the splitting,
    either all the way to bytes or to the largest aligned size.
    
    In addition tidy up the implementation in a few ways:
    
    - Very long lines on the LOAD encdec were fixed by adding a helper
    
    - Add some linebreaks in the code so it reads as less claustrophobic
    
    - Ensure we use the same names for arguments in encdec/execute/assembly.
      Previously we used 'size' and 'width'. I opted for 'width' consistently.
    Alasdair committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    4bdc440 View commit details
    Browse the repository at this point in the history