VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), -4, VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), -4));
VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), Offset.fromIntSignExtend(-4), VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), Offset.fromIntSignExtend(-4)));
  public static void arraycopy16Bit(Object src, int srcPos, Object dst, int dstPos, int len) throws InlinePragma {    if (USE_NATIVE && len > (NATIVE_THRESHOLD >> LOG_BYTES_IN_SHORT)) {      memcopy(VM_Magic.objectAsAddress(dst).add(dstPos<<LOG_BYTES_IN_SHORT),               VM_Magic.objectAsAddress(src).add(srcPos<<LOG_BYTES_IN_SHORT),              len<<LOG_BYTES_IN_SHORT);    } else {      if (len >= (BYTES_IN_ADDRESS >>> LOG_BYTES_IN_SHORT) && (srcPos & ((BYTES_IN_ADDRESS - 1) >>> LOG_BYTES_IN_SHORT)) == (dstPos & ((BYTES_IN_ADDRESS - 1) >>> LOG_BYTES_IN_SHORT))) {        // relative alignment is the same        int byteStart = srcPos<<LOG_BYTES_IN_SHORT;        int wordStart = alignUp(byteStart , BYTES_IN_ADDRESS);        int wordEnd = alignDown(byteStart + (len<<LOG_BYTES_IN_SHORT),BYTES_IN_ADDRESS ) ;        int byteEnd = byteStart + (len<<LOG_BYTES_IN_SHORT);        int startDiff = wordStart - byteStart;        int endDiff = byteEnd - wordEnd;        int wordLen = wordEnd - wordStart;        Address srcPtr = VM_Magic.objectAsAddress(src).add((srcPos<<LOG_BYTES_IN_SHORT)+startDiff);        Address dstPtr = VM_Magic.objectAsAddress(dst).add((dstPos<<LOG_BYTES_IN_SHORT)+startDiff);        switch(startDiff) {        //-#if RVM_FOR_64_ADDR        case 6:          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), -6,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), -6));        case 4:          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), -4,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), -4));        //-#endif        case 2:          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), -2,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), -2));        }                Address endPtr = srcPtr.add(wordLen);        while (srcPtr.LT(endPtr)) {          dstPtr.store(srcPtr.loadWord());          srcPtr = srcPtr.add(BYTES_IN_ADDRESS);          dstPtr = dstPtr.add(BYTES_IN_ADDRESS);        }        switch(endDiff) {        //-#if RVM_FOR_64_ADDR        case 6:          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), 4,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), 4));        case 4:          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), 2,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), 2));        //-#endif        case 2:          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), 0,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), 0));        }      } else {        Address srcPtr = VM_Magic.objectAsAddress(src).add(srcPos<<LOG_BYTES_IN_CHAR);        Address dstPtr = VM_Magic.objectAsAddress(dst).add(dstPos<<LOG_BYTES_IN_CHAR);        Address endPtr = srcPtr.add(len<<LOG_BYTES_IN_CHAR);        while (srcPtr.LT(endPtr)) {          VM_Magic.setCharAtOffset(VM_Magic.addressAsObject(dstPtr), 0,                                   VM_Magic.getCharAtOffset(VM_Magic.addressAsObject(srcPtr), 0));          srcPtr = srcPtr.add(2);          dstPtr = dstPtr.add(2);        }      }    }  }    