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

Revisit register spill/fill code

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools
    • Labels:

      Description

      The stub code that deals with preserving registers when doing upcall or downcall is incomplete or in some cases absent.

      So far this has not been a problem because the surrounding C++ code takes care of preserving registers for us, and this works since the ABIs we're inter-operating with have the some register preservation policy.

      Once we want to talk to other ABIs the missing register spill/fill code will become a problem though, so we should revisit the implementation.

          To recap, for downcalls:
            1. Save every register destroyed by the stub, which is callee-saved (i.e. non-volatile) according to the platform C++ ABI.
            2. Save every register that is volatile in the called custom ABI and which is callee-saved according to the platform C++ ABI.

          For upcalls:
            1. Save every register destroyed by the stub, which is callee-saved (i.e. non-volatile) according to the calling custom ABI.
            2. Save every register that is volatile in the platform C++ ABI which is callee-saved according to the calling custom ABI.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jvernee Jorn Vernee
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: