Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8344169

RISC-V: Use more meaningful frame::metadata_words where possible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24
    • hotspot
    • riscv
    • linux

      Some background to help understand. We have following frame enumerations for RISC-V:

      ```
      enum {
        link_offset = -2,
        return_addr_offset = -1,
        sender_sp_offset = 0
      };
      ```
      The values are compatible with the platform ABI and are different from the other platforms like x64 or aarch64. Especially, `sender_sp_offset` is 0 for RISC-V compared to 2 for the other platforms. As a result, there exists some differences in places where code uses value of `sender_sp_offset` as an sp offset when fp is needed. For RISC-V, we used constant number 2 instead of `sender_sp_offset` as the sp offset. But the code will be more readable if we use `frame::metadata_words` which has the same value.

            fyang Fei Yang
            fyang Fei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: