summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fb/fbmmx.c136
-rw-r--r--fb/fbmmx.h9
2 files changed, 0 insertions, 145 deletions
diff --git a/fb/fbmmx.c b/fb/fbmmx.c
index 3522a0075..452769d8a 100644
--- a/fb/fbmmx.c
+++ b/fb/fbmmx.c
@@ -201,141 +201,5 @@ fbFillmmx (FbBits *bits,
return TRUE;
}
-Bool
-fbBltmmx (FbBits *src_bits,
- FbBits *dst_bits,
- FbStride src_stride,
- FbStride dst_stride,
- int src_bpp,
- int dst_bpp,
- int src_x, int src_y,
- int dst_x, int dst_y,
- int width, int height)
-{
- CARD8 * src_bytes;
- CARD8 * dst_bytes;
- int byte_width;
-
- if (src_bpp != dst_bpp)
- return FALSE;
-
- if (src_bpp == 16)
- {
- src_stride = src_stride * sizeof (FbBits) / 2;
- dst_stride = dst_stride * sizeof (FbBits) / 2;
- src_bytes = (CARD8 *)(((CARD16 *)src_bits) + src_stride * (src_y) + (src_x));
- dst_bytes = (CARD8 *)(((CARD16 *)dst_bits) + dst_stride * (dst_y) + (dst_x));
- byte_width = 2 * width;
- src_stride *= 2;
- dst_stride *= 2;
- } else if (src_bpp == 32) {
- src_stride = src_stride * sizeof (FbBits) / 4;
- dst_stride = dst_stride * sizeof (FbBits) / 4;
- src_bytes = (CARD8 *)(((CARD32 *)src_bits) + src_stride * (src_y) + (src_x));
- dst_bytes = (CARD8 *)(((CARD32 *)dst_bits) + dst_stride * (dst_y) + (dst_x));
- byte_width = 4 * width;
- src_stride *= 4;
- dst_stride *= 4;
- } else {
- return FALSE;
- }
-
- while (height--)
- {
- int w;
- CARD8 *s = src_bytes;
- CARD8 *d = dst_bytes;
- src_bytes += src_stride;
- dst_bytes += dst_stride;
- w = byte_width;
-
- while (w >= 2 && ((unsigned long)d & 3))
- {
- *(CARD16 *)d = *(CARD16 *)s;
- w -= 2;
- s += 2;
- d += 2;
- }
-
- while (w >= 4 && ((unsigned long)d & 7))
- {
- *(CARD32 *)d = *(CARD32 *)s;
-
- w -= 4;
- s += 4;
- d += 4;
- }
-
- while (w >= 64)
- {
-#ifdef __GNUC__
- __asm__ (
- "movq (%1), %%mm0\n"
- "movq 8(%1), %%mm1\n"
- "movq 16(%1), %%mm2\n"
- "movq 24(%1), %%mm3\n"
- "movq 32(%1), %%mm4\n"
- "movq 40(%1), %%mm5\n"
- "movq 48(%1), %%mm6\n"
- "movq 56(%1), %%mm7\n"
-
- "movq %%mm0, (%0)\n"
- "movq %%mm1, 8(%0)\n"
- "movq %%mm2, 16(%0)\n"
- "movq %%mm3, 24(%0)\n"
- "movq %%mm4, 32(%0)\n"
- "movq %%mm5, 40(%0)\n"
- "movq %%mm6, 48(%0)\n"
- "movq %%mm7, 56(%0)\n"
- :
- : "r" (d), "r" (s)
- : "memory",
- "%mm0", "%mm1", "%mm2", "%mm3",
- "%mm4", "%mm5", "%mm6", "%mm7");
-#else
- __m64 v0 = *(__m64 *)(s + 0);
- __m64 v1 = *(__m64 *)(s + 8);
- __m64 v2 = *(__m64 *)(s + 16);
- __m64 v3 = *(__m64 *)(s + 24);
- __m64 v4 = *(__m64 *)(s + 32);
- __m64 v5 = *(__m64 *)(s + 40);
- __m64 v6 = *(__m64 *)(s + 48);
- __m64 v7 = *(__m64 *)(s + 56);
- *(__m64 *)(d + 0) = v0;
- *(__m64 *)(d + 8) = v1;
- *(__m64 *)(d + 16) = v2;
- *(__m64 *)(d + 24) = v3;
- *(__m64 *)(d + 32) = v4;
- *(__m64 *)(d + 40) = v5;
- *(__m64 *)(d + 48) = v6;
- *(__m64 *)(d + 56) = v7;
-#endif
-
- w -= 64;
- s += 64;
- d += 64;
- }
- while (w >= 4)
- {
- *(CARD32 *)d = *(CARD32 *)s;
-
- w -= 4;
- s += 4;
- d += 4;
- }
- if (w >= 2)
- {
- *(CARD16 *)d = *(CARD16 *)s;
- w -= 2;
- s += 2;
- d += 2;
- }
- }
-
- _mm_empty();
-
- return TRUE;
-}
-
#endif /* RENDER */
#endif /* USE_MMX */
diff --git a/fb/fbmmx.h b/fb/fbmmx.h
index 7d32a382b..cd685ce54 100644
--- a/fb/fbmmx.h
+++ b/fb/fbmmx.h
@@ -44,15 +44,6 @@ Bool fbHaveMMX(void);
#ifdef USE_MMX
-Bool fbBltmmx (FbBits *src_bits,
- FbBits *dst_bits,
- FbStride src_stride,
- FbStride dst_stride,
- int src_bpp,
- int dst_bpp,
- int src_x, int src_y,
- int dst_x, int dst_y,
- int width, int height);
Bool fbFillmmx (FbBits *bits,
FbStride stride,
int bpp,