< prev index next >

src/java.desktop/share/native/libmlib_image/mlib_c_ImageCopy.c

Print this page
rev 59383 : [mq]: final

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -230,13 +230,10 @@
     *da++ = *sa++;
 
   if ((((mlib_addr) sa ^ (mlib_addr) da) & 7) == 0) {
     sp = (TYPE_64BIT *) sa;
     dp = (TYPE_64BIT *) da;
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
     for (i = 0; j <= (b_size - 8); j += 8, i++) {
       dp[i] = sp[i];
     }
 
     sa += i << 3;

@@ -247,13 +244,10 @@
     if ((((mlib_addr) sa ^ (mlib_addr) da) & 3) == 0) {
       mlib_u32 *pws, *pwd;
 
       pws = (mlib_u32 *) sa;
       pwd = (mlib_u32 *) da;
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (i = 0; j <= (b_size - 4); j += 4, i++) {
         pwd[i] = pws[i];
       }
 
       sa += i << 2;

@@ -267,13 +261,10 @@
       pws = (mlib_u32 *) (sa - lshift);
       lshift <<= 3;
       rshift = 32 - lshift;
 
       src1 = pws[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (i = 0; j <= (b_size - 4); j += 4, i++) {
         src0 = src1;
         src1 = pws[i + 1];
 #ifdef _LITTLE_ENDIAN
         pwd[i] = (src0 >> lshift) | (src1 << rshift);

@@ -294,13 +285,10 @@
     pws = (mlib_u64 *) (sa - lshift);
     lshift <<= 3;
     rshift = 64 - lshift;
 
     src1 = pws[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
     for (i = 0; j <= (b_size - 8); j += 8, i++) {
       src0 = src1;
       src1 = pws[i + 1];
       pwd[i] = (src0 << lshift) | (src1 >> rshift);
     }

@@ -338,13 +326,10 @@
     if (!(((mlib_addr) psrc_row ^ (mlib_addr) pdst_row) & 7)) {
       for (j = 0; j < (mlib_s32) ((8 - (mlib_addr) psrc_row) & 7); j++) {
         pdst_row[j] = psrc_row[j];
       }
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (; j <= (src_width - 8); j += 8) {
         TYPE_64BIT dsrc0 = *((TYPE_64BIT *) (psrc_row + j));
 
         *((TYPE_64BIT *) (pdst_row + j)) = dsrc0;
       }

@@ -356,13 +341,10 @@
       for (j = 0; j < (mlib_s32) ((4 - (mlib_addr) pdst_row) & 3); j++) {
         pdst_row[j] = psrc_row[j];
       }
 
       if (!(((mlib_addr) psrc_row ^ (mlib_addr) pdst_row) & 3)) {
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 4); j += 4) {
           *((mlib_s32 *) (pdst_row + j)) = *((mlib_s32 *) (psrc_row + j));
         }
       }
       else {

@@ -373,13 +355,10 @@
         ps = (mlib_u32 *) ((mlib_addr) ps - shl);
         shl <<= 3;
         shr = 32 - shl;
 
         src1 = ps[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 4); j += 4) {
           src0 = src1;
           src1 = ps[1];
 #ifdef _LITTLE_ENDIAN
           *((mlib_s32 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);

@@ -406,13 +385,10 @@
         ps = (mlib_u64 *) ((mlib_addr) ps - shl);
         shl <<= 3;
         shr = 64 - shl;
 
         src1 = ps[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 8); j += 8) {
           src0 = src1;
           src1 = ps[1];
 #ifdef _LITTLE_ENDIAN
           *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);

@@ -446,13 +422,10 @@
     if (!(((mlib_addr) psrc_row ^ (mlib_addr) pdst_row) & 7)) {
       for (j = 0; j < (mlib_s32) (((8 - (mlib_addr) psrc_row) & 7) >> 1); j++) {
         pdst_row[j] = psrc_row[j];
       }
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (; j <= (src_width - 4); j += 4) {
         TYPE_64BIT dsrc0 = *((TYPE_64BIT *) (psrc_row + j));
 
         *((TYPE_64BIT *) (pdst_row + j)) = dsrc0;
       }

@@ -464,25 +437,19 @@
       if (j = (((mlib_addr) pdst_row & 2) != 0)) {
         pdst_row[0] = psrc_row[0];
       }
 
       if (!(((mlib_addr) psrc_row ^ (mlib_addr) pdst_row) & 3)) {
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 2); j += 2) {
           *((mlib_s32 *) (pdst_row + j)) = *((mlib_s32 *) (psrc_row + j));
         }
       }
       else {
         mlib_u32 *ps, src0, src1;
 
         ps = (mlib_u32 *) (psrc_row + j - 1);
         src1 = ps[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 2); j += 2) {
           src0 = src1;
           src1 = ps[1];
 #ifdef _LITTLE_ENDIAN
           *((mlib_s32 *) (pdst_row + j)) = (src0 >> 16) | (src1 << 16);

@@ -508,13 +475,10 @@
         ps = (mlib_u64 *) ((mlib_addr) ps - shl);
         shl <<= 3;
         shr = 64 - shl;
 
         src1 = ps[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 4); j += 4) {
           src0 = src1;
           src1 = ps[1];
 #ifdef _LITTLE_ENDIAN
           *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);

@@ -549,26 +513,20 @@
       j = (mlib_s32) ((mlib_addr) psrc_row & 4) >> 2;
       if (j != 0) {
         pdst_row[0] = psrc_row[0];
       }
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (; j <= (src_width - 2); j += 2) {
         TYPE_64BIT dsrc0 = *((TYPE_64BIT *) (psrc_row + j));
 
         *((TYPE_64BIT *) (pdst_row + j)) = dsrc0;
       }
     }
     else {
 
 #ifdef _NO_LONGLONG
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (j = 0; j <= (src_width - 1); j++) {
         *((mlib_s32 *) (pdst_row + j)) = *((mlib_s32 *) (psrc_row + j));
       }
 
 #else

@@ -580,13 +538,10 @@
         if (j != 0) {
           pdst_row[0] = psrc_row[0];
         }
         ps = (mlib_u64 *) (psrc_row + j - 1);
         src1 = ps[0];
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
         for (; j <= (src_width - 2); j += 2) {
           src0 = src1;
           src1 = ps[1];
 #ifdef _LITTLE_ENDIAN
           *((mlib_s64 *) (pdst_row + j)) = (src0 >> 32) | (src1 << 32);

@@ -610,13 +565,10 @@
 {
   PREPAREVARS(mlib_d64);
   for (i = 0; i < src_height; i++) {
     mlib_d64 *psrc_row = psrc + i * src_stride, *pdst_row = pdst + i * dst_stride;
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
     for (j = 0; j < src_width; j++)
       *((mlib_d64 *) (pdst_row + j)) = *((mlib_d64 *) (psrc_row + j));
   }
 }
 

@@ -630,13 +582,10 @@
                          TYPE_64BIT       *dp,
                          mlib_s32         size)
 {
   mlib_s32 i;
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
   for (i = 0; i < size; i++) {
     *dp++ = *sp++;
   }
 }
 

@@ -659,13 +608,10 @@
   mlib_s32 shr, shl;
   TYPE *tmp, s0, s1;
 
   if (((mlib_addr) sp ^ (mlib_addr) dp) & 7) {
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
     for (; (n > 0) && (mlib_addr) dp & (SIZE - 1); n--)
       *dp++ = *sp++;
 
 #ifdef _NO_LONGLONG
 

@@ -683,13 +629,10 @@
       /* shl and shr do not exceed 64 here */
       shl = (mlib_s32) (((mlib_addr) sp & (SIZE - 1)) << 3);
       shr = BSIZE - shl;
       s0 = *tmp++;
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
       for (; n > SIZE; n -= SIZE) {
         s1 = *tmp++;
 #ifdef _LITTLE_ENDIAN
         *(TYPE *) dp = (s0 >> shl) | (s1 << shr);
 #else

@@ -700,29 +643,20 @@
         sp += SIZE;
       }
     }
   }
   else {
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
     for (; (n > 0) && (mlib_addr) dp & 7; n--)
       *dp++ = *sp++;
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
     for (; n > 8; n -= 8) {
       *(TYPE_64BIT *) dp = *(TYPE_64BIT *) sp;
       dp += 8;
       sp += 8;
     }
   }
 
-#ifdef __SUNPRO_C
-#pragma pipeloop(0)
-#endif /* __SUNPRO_C */
   for (; n > 0; n--)
     *dp++ = *sp++;
 }
 
 /***************************************************************/
< prev index next >