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

MergeStores with reverse bytes order value

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • hotspot

      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.

            kwei Kuai Wei
            kwei Kuai Wei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: