diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2007-06-11 22:43:01 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2007-06-11 22:43:01 -0400 |
commit | eb2d7fe02f9cbca57b462bba05498e2d59316fbc (patch) | |
tree | d7ea1879f6bd5d739ea132f319e95dd7d65e23c6 /fb/fbmmx.c | |
parent | f52ae237d3eec79ccd64cdd77271aeacc37af70c (diff) |
Replace fbFillmmx() with pixman_fill() and remove fbmmx.[ch]
Diffstat (limited to 'fb/fbmmx.c')
-rw-r--r-- | fb/fbmmx.c | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/fb/fbmmx.c b/fb/fbmmx.c index 452769d8a..f962b66a9 100644 --- a/fb/fbmmx.c +++ b/fb/fbmmx.c @@ -73,133 +73,5 @@ typedef unsigned __int64 ullong; typedef __m64 mmxdatafield; #endif -Bool -fbFillmmx (FbBits *bits, - FbStride stride, - int bpp, - int x, - int y, - int width, - int height, - FbBits xor) -{ - ullong fill; - __m64 vfill; - CARD32 byte_width; - CARD8 *byte_line; -#ifdef __GNUC__ - __m64 v1, v2, v3, v4, v5, v6, v7; -#endif - - if (bpp == 16 && (xor >> 16 != (xor & 0xffff))) - return FALSE; - - if (bpp != 16 && bpp != 32) - return FALSE; - - if (bpp == 16) - { - stride = stride * sizeof (FbBits) / 2; - byte_line = (CARD8 *)(((CARD16 *)bits) + stride * y + x); - byte_width = 2 * width; - stride *= 2; - } - else - { - stride = stride * sizeof (FbBits) / 4; - byte_line = (CARD8 *)(((CARD32 *)bits) + stride * y + x); - byte_width = 4 * width; - stride *= 4; - } - - fill = ((ullong)xor << 32) | xor; - vfill = (__m64)fill; - -#ifdef __GNUC__ - __asm__ ( - "movq %7, %0\n" - "movq %7, %1\n" - "movq %7, %2\n" - "movq %7, %3\n" - "movq %7, %4\n" - "movq %7, %5\n" - "movq %7, %6\n" - : "=y" (v1), "=y" (v2), "=y" (v3), - "=y" (v4), "=y" (v5), "=y" (v6), "=y" (v7) - : "y" (vfill)); -#endif - - while (height--) - { - int w; - CARD8 *d = byte_line; - byte_line += stride; - w = byte_width; - - while (w >= 2 && ((unsigned long)d & 3)) - { - *(CARD16 *)d = xor; - w -= 2; - d += 2; - } - - while (w >= 4 && ((unsigned long)d & 7)) - { - *(CARD32 *)d = xor; - - w -= 4; - d += 4; - } - - while (w >= 64) - { -#ifdef __GNUC__ - __asm__ ( - "movq %1, (%0)\n" - "movq %2, 8(%0)\n" - "movq %3, 16(%0)\n" - "movq %4, 24(%0)\n" - "movq %5, 32(%0)\n" - "movq %6, 40(%0)\n" - "movq %7, 48(%0)\n" - "movq %8, 56(%0)\n" - : - : "r" (d), - "y" (vfill), "y" (v1), "y" (v2), "y" (v3), - "y" (v4), "y" (v5), "y" (v6), "y" (v7) - : "memory"); -#else - *(__m64*) (d + 0) = vfill; - *(__m64*) (d + 8) = vfill; - *(__m64*) (d + 16) = vfill; - *(__m64*) (d + 24) = vfill; - *(__m64*) (d + 32) = vfill; - *(__m64*) (d + 40) = vfill; - *(__m64*) (d + 48) = vfill; - *(__m64*) (d + 56) = vfill; -#endif - w -= 64; - d += 64; - } - - while (w >= 4) - { - *(CARD32 *)d = xor; - - w -= 4; - d += 4; - } - if (w >= 2) - { - *(CARD16 *)d = xor; - w -= 2; - d += 2; - } - } - - _mm_empty(); - return TRUE; -} - #endif /* RENDER */ #endif /* USE_MMX */ |