diff options
author | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2006-03-22 21:13:08 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2006-03-22 21:13:08 +0000 |
commit | 5b3084c64f7bd1232603ffb3e985600b8d045453 (patch) | |
tree | edbc01ef10072326460fe7a152eddfc3d02448fc /fb/fbmmx.c | |
parent | a08e5e0c68baaf85b0fc3ecde74a6bcf80bcd4bf (diff) |
Wed Mar 22 16:05:09 2006 Søren Sandmann <sandmann@redhat.com>
Use inline assembly for solid fills, since gcc doesn't use the movq
instructions.
Diffstat (limited to 'fb/fbmmx.c')
-rw-r--r-- | fb/fbmmx.c | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/fb/fbmmx.c b/fb/fbmmx.c index fef5c3820..73c715795 100644 --- a/fb/fbmmx.c +++ b/fb/fbmmx.c @@ -2050,6 +2050,7 @@ fbSolidFillmmx (DrawablePtr pDraw, CARD8 *byte_line; FbBits *bits; int xoff, yoff; + __m64 v1, v2, v3, v4, v5, v6, v7; CHECKPOINT(); @@ -2079,6 +2080,18 @@ fbSolidFillmmx (DrawablePtr pDraw, fill = ((ullong)xor << 32) | xor; vfill = (__m64)fill; + __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)); + while (height--) { int w; @@ -2100,21 +2113,28 @@ fbSolidFillmmx (DrawablePtr pDraw, w -= 4; d += 4; } - + while (w >= 64) { - *(__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; + __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"); w -= 64; d += 64; } + while (w >= 4) { *(CARD32 *)d = xor; |