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

Support rv64 #78

Merged
merged 23 commits into from
Jul 15, 2020
Merged

Support rv64 #78

merged 23 commits into from
Jul 15, 2020

Commits on Jun 10, 2020

  1. Elongate registers and CSRs to 64 bits

    Also changed cycle, instret and time to be directly updated as 64 bits.
    TheThirdOne committed Jun 10, 2020
    Configuration menu
    Copy the full SHA
    41bf15e View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2020

  1. Convert most instructions to rv64 compatable versions.

    The remaining instructions which might need modifications are:
      Floating point (which shouldn't need to change)
      JALR
      Immediate mode shifts
      Stores and loads need a little update to support new instructions
    TheThirdOne committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    cd86550 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c57464d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c8a9f42 View commit details
    Browse the repository at this point in the history
  4. Update load and store instuctions for rv64

    Also this fixes a bug in backstepping FSD and a tautologically true test.
    TheThirdOne committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    11b976f View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2020

  1. Add a setting for rv64 mode.

    On change of this setting all instructions are reloaded and ones that
    don't work in the current mode will fail to initialize. Its a kindof
    hacky solution, but it does allow overwriting other instructions.
    
    The mechanism for failing to load is BasicInstruction throwing a null
    pointer exception.
    TheThirdOne committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    0ee10ac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0ad1414 View commit details
    Browse the repository at this point in the history
  3. Add SXXIWs

    TheThirdOne committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    a41cc5e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e6d5232 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. Configuration menu
    Copy the full SHA
    d76774d View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. Configuration menu
    Copy the full SHA
    1cc4d0d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa20f6c View commit details
    Browse the repository at this point in the history
  3. Allow 64 bit numbers for li and .dword

    This was quite difficult to actually implement, but is quite
    neccessary to automatically run tests from riscv-tests. Most
    of the difficulty stemmed from a bunch of places in the code
    expecting the biggest value would be an int rather than a
    long.
    
    However, making li work with 64 bit values was also a little
    bit of work. It neccessitated making 5 new types of Psuedo-op
    templates.
    
    .dword was relatively simple after li wsa working, but required
    modifying a significant amount of code.
    TheThirdOne committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    d5b240c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    504eac9 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2020

  1. Configuration menu
    Copy the full SHA
    d050877 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2020

  1. Configuration menu
    Copy the full SHA
    4af5de1 View commit details
    Browse the repository at this point in the history
  2. Remove erroneous import

    TheThirdOne committed Jun 21, 2020
    Configuration menu
    Copy the full SHA
    21f3a45 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2020

  1. Fix .dword replicating the low bits instead of sign-extending

    This bug was caused by a few issues. First, when adding .dword
    I decided to allow existing code to handle the fits within 32
    bit case. The old code could not possibly handle that correctly.
    Second, lengthinbytes = 8 was passed into the Memory system, given
    that it takes an int as data and there are only 4 bytes in an
    int it doesn't have defined behaviour for 8 bytes. Third, javas
    shifting loops after 32 for integers. So in total, I failed to
    account for a case, passed an undefined input into memory, which
    resulted in replicated behaviour due to java.
    
    I fixed it by just always handling the writes for .dword directly.
    TheThirdOne committed Jun 23, 2020
    Configuration menu
    Copy the full SHA
    af804a5 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2020

  1. Add tests from riscv-tests/rv64ui

    Significant postproccessing on these tests was needed to get them to
    assemble. The test templates use a bunch of shifting and masking which
    is not explanded by gcc when outputting assembly. Simpliying the
    templates + sed to replace things automatically works pretty well, but
    it also uses numbered branches which would force those to be rewrtiten
    by hand. Also srl used C shifting logic to generate answers so that
    needed to be done by hand.
    
    In general, branches not included and very minor manual changes after
    a small script post-processing and template changes.
    TheThirdOne committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    b34eaf9 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2020

  1. Fix mulhu for rv64, jalr from binary and jalr when both registers are…

    … the same
    
    Both jalr bugs apply to both rv32 and rv64, but only got caught
    now because of the binary testing which allowed me to run the
    riscv-tests that use special branching syntax RARS doesn't support.
    TheThirdOne committed Jul 2, 2020
    Configuration menu
    Copy the full SHA
    ee095d5 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2020

  1. Add rv64 cli option

    TheThirdOne committed Jul 8, 2020
    Configuration menu
    Copy the full SHA
    21bf74e View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. Configuration menu
    Copy the full SHA
    ca1fb58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2faba4c View commit details
    Browse the repository at this point in the history