2 * Fill odd tiled rectangles and spans.
3 * no depth dependencies.
8 Copyright (c) 1989 X Consortium
10 Permission is hereby granted, free of charge, to any person obtaining a copy
11 of this software and associated documentation files (the "Software"), to deal
12 in the Software without restriction, including without limitation the rights
13 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 Except as contained in this notice, the name of the X Consortium shall not be
28 used in advertising or otherwise to promote the sale, use or other dealings
29 in this Software without prior written authorization from the X Consortium.
32 /* $XConsortium: cfbtileodd.c,v 1.16 94/04/17 20:29:06 dpw Exp $ */
33 /* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.0 1996/06/29 09:05:55 dawes Exp $ */
40 #include "pixmapstr.h"
41 #include "scrnintstr.h"
42 #include "windowstr.h"
45 #include "cfbmskbits.h"
52 #define LEFTSHIFT_AMT (3)
53 #else /* PGSZ == 64 */
54 #define LEFTSHIFT_AMT (4 - PWSH)
58 #define LEFTSHIFT_AMT (5 - PWSH)
59 #else /* PGSZ == 64 */
60 #define LEFTSHIFT_AMT (6 - PWSH)
64 #define LastTileBits {\
67 bits = (*pSrc & tileEndMask) | BitRight (*pSrcLine, tileEndLeftShift); \
73 #define ResetTileBits {\
77 if (4 - xoff + tileEndPart <= 4) {\
81 bits = BitLeft(tmp, tileEndLeftShift) | \
82 BitRight(bits, tileEndRightShift); \
83 xoff = (xoff + xoffStep) & 3; \
84 leftShift = xoff << LEFTSHIFT_AMT; \
85 rightShift = PGSZ - leftShift; \
89 #define ResetTileBits {\
93 if (PPW - xoff + tileEndPart <= PPW) {\
97 bits = BitLeft(tmp, tileEndLeftShift) | \
98 BitRight(bits, tileEndRightShift); \
99 xoff = (xoff + xoffStep) & PIM; \
100 leftShift = xoff << LEFTSHIFT_AMT; \
101 rightShift = PGSZ - leftShift; \
106 #define NextTileBits {\
124 MROP_NAME(cfbFillBoxTileOdd) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, planemask)
125 DrawablePtr pDrawable;
126 int nBox; /* number of boxes to fill */
127 register BoxPtr pBox; /* pointer to list of boxes to fill */
128 PixmapPtr tile; /* tile */
131 unsigned long planemask;
133 int tileWidth; /* width of tile in pixels */
134 int tileHeight; /* height of the tile */
137 int widthDst; /* width in longwords of the dest pixmap */
138 int w; /* width of current box */
139 int h; /* height of current box */
140 unsigned long startmask;
141 unsigned long endmask;/* masks for reggedy bits at either end of line */
142 int nlwMiddle; /* number of longwords between sides of boxes */
143 int nlwSrc; /* number of whole longwords in source */
145 register int nlw; /* loop version of nlwMiddle */
146 int srcy; /* current tile y position */
147 int srcx; /* current tile x position */
148 int xoffDst, xoffSrc;
149 int leftShift, rightShift;
153 unsigned long *pDstBase; /* pointer to start of dest */
154 unsigned long *pDstLine; /* poitner to start of dest box */
155 unsigned long *pSrcBase; /* pointer to start of source */
156 unsigned long *pSrcLine; /* pointer to start of source line */
157 register unsigned long *pDst;
158 register unsigned long *pSrc;
159 register unsigned long bits, tmp;
160 register int nlwPart;
162 int leftShiftStart, rightShiftStart, nlwSrcStart;
163 unsigned long tileEndMask;
164 int tileEndLeftShift, tileEndRightShift;
168 unsigned long narrow[2];
169 unsigned long narrowMask;
173 MROP_INITIALIZE (alu, planemask)
175 tileHeight = tile->drawable.height;
176 tileWidth = tile->drawable.width;
177 widthSrc = tile->devKind / PGSZB;
181 narrowShift = tileWidth;
182 narrowMask = cfbendpartial [tileWidth];
187 pSrcBase = (unsigned long *)tile->devPrivate.ptr;
189 cfbGetLongWidthAndPointer (pDrawable, widthDst, pDstBase)
192 tileEndPart = (4 - tileWidth) & 3;
193 tileEndMask = cfbendpartial[tileWidth & 3];
195 tileEndPart = tileWidth & PIM;
196 tileEndMask = cfbendpartial[tileEndPart];
197 #endif /* PSZ == 24 */
198 tileEndLeftShift = (tileEndPart) << LEFTSHIFT_AMT;
199 tileEndRightShift = PGSZ - tileEndLeftShift;
201 xoffStep = 4 - tileEndPart;
203 xoffStep = PPW - tileEndPart;
204 #endif /* PSZ == 24 */
206 * current assumptions: tile > 32 bits wide.
210 w = pBox->x2 - pBox->x1;
211 h = pBox->y2 - pBox->y1;
212 modulus (pBox->x1 - xrot, tileWidth, srcx);
213 modulus (pBox->y1 - yrot, tileHeight, srcy);
215 xoffDst = (4 - pBox->x1) & 3;
216 if (w == 1 && (xoffDst == 0 || xoffDst == 1))
218 xoffDst = pBox->x1 & PIM;
219 if (xoffDst + w < PPW)
222 maskpartialbits(pBox->x1, w, startmask);
228 maskbits (pBox->x1, w, startmask, endmask, nlwMiddle)
231 pDstLine = pDstBase + (pBox->y1 * widthDst) + ((pBox->x1*3) >> 2);
233 pDstLine = pDstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH);
235 pSrcLine = pSrcBase + (srcy * widthSrc);
237 xoffSrc = (4 - srcx) & 3;
239 xoffSrc = srcx & PIM;
241 if (xoffSrc >= xoffDst)
243 xoffStart = xoffSrc - xoffDst;
249 xoffStart = 4 - (xoffDst - xoffSrc);
251 xoffStart = PPW - (xoffDst - xoffSrc);
255 leftShiftStart = (xoffStart) << LEFTSHIFT_AMT;
256 rightShiftStart = PGSZ - leftShiftStart;
258 nlwSrcStart = widthSrc - ((srcx*3) >> 2);
260 nlwSrcStart = widthSrc - (srcx >> PWSH);
264 /* XXX only works when narrowShift >= PPW/2 */
267 tmp = pSrcBase[srcy] & narrowMask; /* source width == 1 */
268 narrow[0] = tmp | SCRRIGHT (tmp, narrowShift);
270 narrow[1] = BitLeft (tmp, 8) |
273 narrow[1] = SCRLEFT (tmp, PPW - narrowShift) |
274 SCRRIGHT(tmp, 2 * narrowShift - PPW);
279 leftShift = leftShiftStart;
280 rightShift = rightShiftStart;
281 nlwSrc = nlwSrcStart;
283 pSrc = pSrcLine + ((srcx * 3) >> 2);
285 pSrc = pSrcLine + (srcx >> PWSH);
296 tmp = BitLeft(tmp, leftShift);
297 if (rightShift != PGSZ)
298 tmp |= BitRight(bits,rightShift);
299 *pDst = MROP_MASK (tmp, *pDst, startmask);
309 if (nlwPart >= nlwSrc)
310 nlwPart = nlwSrc - 1;
313 if (rightShift != PGSZ)
319 *pDst = MROP_SOLID(BitLeft(tmp, leftShift) |
320 BitRight (bits, rightShift),
329 *pDst = MROP_SOLID (bits, *pDst);
334 *pDst = MROP_SOLID(*pSrc, *pDst);
345 if (rightShift != PGSZ)
347 *pDst = MROP_SOLID(BitLeft(tmp, leftShift) |
348 BitRight(bits, rightShift),
353 *pDst = MROP_SOLID (tmp, *pDst);
362 if (rightShift == PGSZ)
364 *pDst = MROP_MASK (BitLeft(tmp, leftShift) |
365 BitRight(bits,rightShift),
368 pDstLine += widthDst;
369 pSrcLine += widthSrc;
370 if (++srcy == tileHeight)
381 MROP_NAME(cfbFillSpanTileOdd) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu, planemask)
382 DrawablePtr pDrawable;
389 unsigned long planemask;
391 int tileWidth; /* width of tile in pixels */
392 int tileHeight; /* height of the tile */
395 int widthDst; /* width in longwords of the dest pixmap */
396 int w; /* width of current span */
397 unsigned long startmask;
398 unsigned long endmask; /* masks for reggedy bits at either end of line */
399 int nlwSrc; /* number of whole longwords in source */
401 register int nlw; /* loop version of nlwMiddle */
402 int srcy; /* current tile y position */
403 int srcx; /* current tile x position */
404 int xoffDst, xoffSrc;
405 int leftShift, rightShift;
409 unsigned long *pDstBase; /* pointer to start of dest */
410 unsigned long *pDstLine; /* poitner to start of dest box */
411 unsigned long *pSrcBase; /* pointer to start of source */
412 unsigned long *pSrcLine; /* pointer to start of source line */
413 register unsigned long *pDst;
414 register unsigned long *pSrc;
415 register unsigned long bits, tmp;
416 register int nlwPart;
418 int leftShiftStart, rightShiftStart, nlwSrcStart;
419 unsigned long tileEndMask;
420 int tileEndLeftShift, tileEndRightShift;
424 unsigned long narrow[2];
425 unsigned long narrowMask;
429 MROP_INITIALIZE (alu, planemask)
431 tileHeight = tile->drawable.height;
432 tileWidth = tile->drawable.width;
433 widthSrc = tile->devKind / PGSZB;
437 narrowShift = tileWidth;
438 narrowMask = cfbendpartial [tileWidth];
443 pSrcBase = (unsigned long *)tile->devPrivate.ptr;
445 cfbGetLongWidthAndPointer (pDrawable, widthDst, pDstBase)
448 tileEndPart = (4 - tileWidth) & 3;
449 tileEndMask = cfbendpartial[tileWidth & 3];
451 tileEndPart = tileWidth & PIM;
452 tileEndMask = cfbendpartial[tileEndPart];
454 tileEndLeftShift = (tileEndPart) << LEFTSHIFT_AMT;
455 tileEndRightShift = PGSZ - tileEndLeftShift;
457 xoffStep = 4 - tileEndPart;
459 xoffStep = PPW - tileEndPart;
464 modulus (ppt->x - xrot, tileWidth, srcx);
465 modulus (ppt->y - yrot, tileHeight, srcy);
467 xoffDst = (4 - ppt->x) & 3;
468 if (w == 1 && (xoffDst == 0 || xoffDst == 1))
470 xoffDst = ppt->x & PIM;
471 if (xoffDst + w < PPW)
474 maskpartialbits(ppt->x, w, startmask);
480 maskbits (ppt->x, w, startmask, endmask, nlw)
483 pDstLine = pDstBase + (ppt->y * widthDst) + ((ppt->x *3)>> 2);
485 pDstLine = pDstBase + (ppt->y * widthDst) + (ppt->x >> PWSH);
487 pSrcLine = pSrcBase + (srcy * widthSrc);
489 xoffSrc = (4 - srcx) & 3;
491 xoffSrc = srcx & PIM;
493 if (xoffSrc >= xoffDst)
495 xoffStart = xoffSrc - xoffDst;
501 xoffStart = 4 - (xoffDst - xoffSrc);
503 xoffStart = PPW - (xoffDst - xoffSrc);
507 leftShiftStart = (xoffStart) << LEFTSHIFT_AMT;
508 rightShiftStart = PGSZ - leftShiftStart;
510 nlwSrcStart = widthSrc - ((srcx*3) >> 2);
512 nlwSrcStart = widthSrc - (srcx >> PWSH);
514 /* XXX only works when narrowShift >= PPW/2 */
517 tmp = pSrcBase[srcy] & narrowMask; /* source width == 1 */
518 narrow[0] = tmp | SCRRIGHT (tmp, narrowShift);
520 narrow[1] = BitLeft (tmp, 8) |
523 narrow[1] = SCRLEFT (tmp, PPW - narrowShift) |
524 SCRRIGHT(tmp, 2 * narrowShift - PPW);
529 leftShift = leftShiftStart;
530 rightShift = rightShiftStart;
531 nlwSrc = nlwSrcStart;
533 pSrc = pSrcLine + ((srcx * 3) >> 2);
535 pSrc = pSrcLine + (srcx >> PWSH);
546 tmp = BitLeft(tmp, leftShift);
547 if (rightShift != PGSZ)
548 tmp |= BitRight(bits,rightShift);
549 *pDst = MROP_MASK (tmp, *pDst, startmask);
558 if (nlwPart >= nlwSrc)
559 nlwPart = nlwSrc - 1;
562 if (rightShift != PGSZ)
568 *pDst = MROP_SOLID(BitLeft(tmp, leftShift) |
569 BitRight (bits, rightShift),
578 *pDst = MROP_SOLID (bits, *pDst);
583 *pDst = MROP_SOLID(*pSrc, *pDst);
594 if (rightShift != PGSZ)
596 *pDst = MROP_SOLID(BitLeft(tmp, leftShift) |
597 BitRight(bits, rightShift),
603 *pDst = MROP_SOLID (tmp, *pDst);
612 if (rightShift == PGSZ)
614 *pDst = MROP_MASK (BitLeft(tmp, leftShift) |
615 BitRight(bits,rightShift),
622 # include "fastblt.h"
624 #define IncSrcPtr psrc++; if (!--srcRemaining) { srcRemaining = widthSrc; psrc = psrcStart; }
627 MROP_NAME(cfbFillBoxTile32s) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, planemask)
628 DrawablePtr pDrawable;
629 int nBox; /* number of boxes to fill */
630 register BoxPtr pBox; /* pointer to list of boxes to fill */
631 PixmapPtr tile; /* tile */
634 unsigned long planemask;
636 int tileWidth; /* width of tile */
637 int tileHeight; /* height of the tile */
638 int widthSrc; /* width in longwords of the source tile */
640 int widthDst; /* width in longwords of the dest pixmap */
641 int w; /* width of current box */
642 int h; /* height of current box */
643 unsigned long startmask;
644 unsigned long endmask;/* masks for reggedy bits at either end of line */
645 int nlMiddle; /* number of longwords between sides of boxes */
647 register int nl; /* loop version of nlMiddle */
648 int srcy; /* current tile y position */
649 int srcx; /* current tile x position */
650 int srcRemaining; /* number of longwords remaining in source */
651 int xoffDst, xoffSrc;
652 int srcStart; /* number of longwords source offset at left of box */
653 int leftShift, rightShift;
657 unsigned long *pdstBase; /* pointer to start of dest */
658 unsigned long *pdstLine; /* poitner to start of dest box */
659 unsigned long *psrcBase; /* pointer to start of source */
660 unsigned long *psrcLine; /* pointer to fetch point of source */
661 unsigned long *psrcStart; /* pointer to start of source line */
662 register unsigned long *pdst;
663 register unsigned long *psrc;
664 register unsigned long bits, bits1;
667 MROP_INITIALIZE (alu, planemask)
669 psrcBase = (unsigned long *)tile->devPrivate.ptr;
670 tileHeight = tile->drawable.height;
671 tileWidth = tile->drawable.width;
673 widthSrc = tile->devKind / PGSZB;
675 widthSrc = tileWidth >> PWSH;
678 cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase)
682 w = pBox->x2 - pBox->x1;
683 h = pBox->y2 - pBox->y1;
686 modulus (pBox->x1 - xrot, tileWidth, srcx);
687 modulus (pBox->y1 - yrot, tileHeight, srcy);
689 xoffSrc = (4 - srcx) & 3;
690 srcStart = (srcx * 3) >> 2;
692 xoffSrc = srcx & PIM;
693 srcStart = (srcx >> PWSH);
695 psrcStart = psrcBase + (srcy * widthSrc);
696 psrcLine = psrcStart + srcStart;
700 xoffDst = (4 - pBox->x1) & 3;
701 pdstLine = pdstBase + (pBox->y1 * widthDst) + ((pBox->x1*3) >> 2);
703 xoffDst = pBox->x1 & PIM;
704 pdstLine = pdstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH);
708 if (w == 1 && (xoffDst == 0 || xoffDst == 1))
710 if (xoffDst + w < PPW)
713 maskpartialbits(pBox->x1, w, startmask);
719 maskbits (pBox->x1, w, startmask, endmask, nlMiddle)
721 if (xoffSrc == xoffDst)
727 srcRemaining = widthSrc - srcStart;
730 *pdst = MROP_MASK (*psrc, *pdst, startmask);
738 if (nl > srcRemaining)
745 #ifdef LARGE_INSTRUCTION_CACHE
746 #ifdef FAST_CONSTANT_OFFSET_MODE
748 psrc += nl & (UNROLL-1);
749 pdst += nl & (UNROLL-1);
751 #define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]);
752 #define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]);
760 #define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++;
761 #define BodyEven(n) BodyOdd(n)
774 *pdst = MROP_SOLID (*psrc, *pdst);
779 *pdst = MROP_SOLID (*psrc, *pdst);
785 srcRemaining = widthSrc;
791 *pdst = MROP_MASK (*psrc, *pdst, endmask);
793 pdstLine += widthDst;
794 psrcLine += widthSrc;
795 psrcStart += widthSrc;
796 if (++srcy == tileHeight)
798 psrcStart = psrcBase;
799 psrcLine = psrcStart + srcStart;
806 if (xoffSrc > xoffDst)
808 leftShift = (xoffSrc - xoffDst) << LEFTSHIFT_AMT;
809 rightShift = PGSZ - leftShift;
813 rightShift = (xoffDst - xoffSrc) << LEFTSHIFT_AMT;
814 leftShift = PGSZ - rightShift;
821 srcRemaining = widthSrc - srcStart;
822 if (xoffSrc > xoffDst)
829 bits1 = BitLeft(bits,leftShift);
832 bits1 |= BitRight(bits,rightShift);
833 *pdst = MROP_MASK(bits1, *pdst, startmask);
840 if (nl > srcRemaining)
847 #ifdef LARGE_INSTRUCTION_CACHE
850 #ifdef FAST_CONSTANT_OFFSET_MODE
852 psrc += nl & (UNROLL-1);
853 pdst += nl & (UNROLL-1);
857 pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]);
859 #define BodyEven(n) \
861 pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]);
871 *pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \
874 #define BodyEven(n) \
876 *pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \
881 #endif /* !FAST_CONSTANT_OFFSET_MODE */
891 bits1 = BitLeft(bits, leftShift);
893 *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst);
899 bits1 = BitLeft(bits, leftShift);
901 *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst);
907 srcRemaining = widthSrc;
914 bits1 = BitLeft(bits, leftShift);
915 if (BitLeft(endmask, rightShift))
918 bits1 |= BitRight(bits, rightShift);
920 *pdst = MROP_MASK (bits1, *pdst, endmask);
922 pdstLine += widthDst;
923 psrcLine += widthSrc;
924 psrcStart += widthSrc;
925 if (++srcy == tileHeight)
927 psrcStart = psrcBase;
928 psrcLine = psrcStart + srcStart;
938 MROP_NAME(cfbFillSpanTile32s) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu, planemask)
939 DrawablePtr pDrawable;
946 unsigned long planemask;
948 int tileWidth; /* width of tile */
949 int tileHeight; /* height of the tile */
950 int widthSrc; /* width in longwords of the source tile */
952 int widthDst; /* width in longwords of the dest pixmap */
953 int w; /* width of current box */
954 unsigned long startmask;
955 unsigned long endmask;/* masks for reggedy bits at either end of line */
956 int nlMiddle; /* number of longwords between sides of boxes */
958 register int nl; /* loop version of nlMiddle */
959 int srcy; /* current tile y position */
960 int srcx; /* current tile x position */
961 int srcRemaining; /* number of longwords remaining in source */
962 int xoffDst, xoffSrc;
963 int srcStart; /* number of longwords source offset at left of box */
964 int leftShift, rightShift;
968 unsigned long *pdstBase; /* pointer to start of dest */
969 unsigned long *pdstLine; /* poitner to start of dest box */
970 unsigned long *psrcBase; /* pointer to start of source */
971 unsigned long *psrcLine; /* pointer to fetch point of source */
972 unsigned long *psrcStart; /* pointer to start of source line */
973 register unsigned long *pdst;
974 register unsigned long *psrc;
975 register unsigned long bits, bits1;
978 MROP_INITIALIZE (alu, planemask)
980 psrcBase = (unsigned long *)tile->devPrivate.ptr;
981 tileHeight = tile->drawable.height;
982 tileWidth = tile->drawable.width;
984 widthSrc = tile->devKind / PGSZB;
986 widthSrc = tileWidth >> PWSH;
989 cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase)
996 modulus (ppt->x - xrot, tileWidth, srcx);
997 modulus (ppt->y - yrot, tileHeight, srcy);
999 xoffSrc = (4 - srcx) & 3;
1000 srcStart = (srcx * 3) >> 2;
1002 xoffSrc = srcx & PIM;
1003 srcStart = (srcx >> PWSH);
1005 psrcStart = psrcBase + (srcy * widthSrc);
1006 psrcLine = psrcStart + srcStart;
1010 xoffDst = (4 - ppt->x) & 3;
1011 pdstLine = pdstBase + (ppt->y * widthDst) + ((ppt->x *3) >> 2);
1013 if (w == 1 && (xoffDst == 0 || xoffDst == 1))
1015 xoffDst = ppt->x & PIM;
1016 pdstLine = pdstBase + (ppt->y * widthDst) + (ppt->x >> PWSH);
1018 if (xoffDst + w < PPW)
1021 maskpartialbits(ppt->x, w, startmask);
1027 maskbits (ppt->x, w, startmask, endmask, nlMiddle)
1030 if (xoffSrc == xoffDst)
1034 srcRemaining = widthSrc - srcStart;
1037 *pdst = MROP_MASK (*psrc, *pdst, startmask);
1045 if (nl > srcRemaining)
1052 #ifdef LARGE_INSTRUCTION_CACHE
1053 #ifdef FAST_CONSTANT_OFFSET_MODE
1055 psrc += nl & (UNROLL-1);
1056 pdst += nl & (UNROLL-1);
1058 #define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]);
1059 #define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]);
1067 #define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++;
1068 #define BodyEven(n) BodyOdd(n)
1081 *pdst = MROP_SOLID (*psrc, *pdst);
1086 *pdst = MROP_SOLID (*psrc, *pdst);
1092 srcRemaining = widthSrc;
1098 *pdst = MROP_MASK (*psrc, *pdst, endmask);
1103 if (xoffSrc > xoffDst)
1105 leftShift = (xoffSrc - xoffDst) << LEFTSHIFT_AMT;
1106 rightShift = PGSZ - leftShift;
1110 rightShift = (xoffDst - xoffSrc) << LEFTSHIFT_AMT;
1111 leftShift = PGSZ - rightShift;
1116 srcRemaining = widthSrc - srcStart;
1117 if (xoffSrc > xoffDst)
1124 bits1 = BitLeft(bits,leftShift);
1127 bits1 |= BitRight(bits,rightShift);
1128 *pdst = MROP_MASK(bits1, *pdst, startmask);
1135 if (nl > srcRemaining)
1142 #ifdef LARGE_INSTRUCTION_CACHE
1145 #ifdef FAST_CONSTANT_OFFSET_MODE
1147 psrc += nl & (UNROLL-1);
1148 pdst += nl & (UNROLL-1);
1150 #define BodyOdd(n) \
1152 pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]);
1154 #define BodyEven(n) \
1156 pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]);
1164 #define BodyOdd(n) \
1166 *pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \
1169 #define BodyEven(n) \
1171 *pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \
1176 #endif /* !FAST_CONSTANT_OFFSET_MODE */
1186 bits1 = BitLeft(bits, leftShift);
1188 *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst);
1194 bits1 = BitLeft(bits,leftShift);
1196 *pdst = MROP_SOLID(bits1|BitRight(bits,rightShift), *pdst);
1202 srcRemaining = widthSrc;
1209 bits1 = BitLeft(bits, leftShift);
1210 if (BitLeft(endmask, rightShift))
1213 bits1 |= BitRight(bits, rightShift);
1215 *pdst = MROP_MASK (bits1, *pdst, endmask);