MergeStores with reverse bytes order value

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 25
    • Component/s: hotspot
    • b14

      Now MergeStores optimization only support stored value in sequential order, not support value in reverse order. For example, in little endian machine, code piece like below can not be merged

      public void patchInt(int offset, int x) {
         byte[] elems = this.elems;
         elems[offset ] = (byte) (x >> 24);
         elems[offset + 1] = (byte) (x >> 16);
         elems[offset + 2] = (byte) (x >> 8);
         elems[offset + 3] = (byte) x;
      }

      This pattern may appeared in access data between big-endian and little-endian.

            Assignee:
            Kuai Wei
            Reporter:
            Kuai Wei
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: