RISC-V: Refactor add/sub assembler routines

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 25
    • Component/s: hotspot
    • b06
    • riscv
    • linux

      Currently, we have mixed use of `addi` and `add(int64_t)`/`sub(int64_t)`. The former adds a 12-bit immediate while the latter
      does not have a constraint on the immediate range. We should use `addi` when possible, which would help save one runtime check
      about the immediate range and save the tmp register used by the latter as well. In order to make the code more readable, this
      also introduces helper routines `subi`/`subiw` and adapts callsites of `addi`/`addiw` with negative immediates.

            Assignee:
            Fei Yang
            Reporter:
            Fei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: