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

Replace VMReg in shuffling code with something more fine grained.

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: In Progress
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      There are several issues with VMReg that mean it is unsuitable for our purposes.

      - It can not distinguish between different register segments, meaning that for instance it can not distinguish between different vector register sizes.
      - It only supports 32-bit stack slots, while some ABIs require more fine-grained stack slot addressing.

      My current idea is to have a class like this:

          class VMStorage {
            char _type;
            char _reserved = 0;
            short _segment_mask;
            int _index;
          }

      the `_type` and `_index` fields are just like the current `type` and `index` components in VMStorage. But, the `_segment_mask` field can be used to distinguish between different overlapping registers. For instance, RAX would be `_type = 0, _segment_mask = 0b0000_0000_0000_1111, _index = 0`. while EAX would be `_type = 0, _segment_mask = 0b0000_0000_0000_0111, _index = 0`, i.e. same type and index, just a different mask.

      Supporting this would require re-writing the shuffling code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jvernee Jorn Vernee
              Reporter:
              jvernee Jorn Vernee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: