diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
commit | d568221710959cf7d783e6ff0fb80fb43a231124 (patch) | |
tree | 8d6f039393294c6ffac8533639afdebe5d68bfc1 /cfb/stip68kgnu.h | |
parent | 9508a382f8a9f241dab097d921b6d290c1c3a776 (diff) |
XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1
Diffstat (limited to 'cfb/stip68kgnu.h')
-rw-r--r-- | cfb/stip68kgnu.h | 161 |
1 files changed, 78 insertions, 83 deletions
diff --git a/cfb/stip68kgnu.h b/cfb/stip68kgnu.h index 9b2c7a1b3..9a2bac720 100644 --- a/cfb/stip68kgnu.h +++ b/cfb/stip68kgnu.h @@ -25,101 +25,96 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ +/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.4 2001/12/14 19:59:25 dawes Exp $ */ /* * Stipple stack macro for 68k GCC - * - * Note - this macro can nott describe the full extent of the - * modifications made to the arguments (GCC does not allow enough - * arguments to __asm statements). Therefore, it is possible - * (though unlikely) that future magic versions of GCC may - * miscompile this somehow. In particular, (stipple) is modified - * by the macro, yet not listed as an output value. */ #define STIPPLE(addr,stipple,value,width,count,shift) \ __asm volatile ( \ - "subqw #1,%1\n\ - lea 0f,a1\n\ - movew #28,d2\n\ - addl %7,d2\n\ - movew #28,d3\n\ - subql #4,%7\n\ - negl %7\n\ + "lea 5f,%/a1\n\ + moveq #28,%/d2\n\ + addl %2,%/d2\n\ + moveq #28,%/d3\n\ + subql #4,%2\n\ + negl %2\n\ 1:\n\ - movel %0,a0\n\ - addl %5,%0\n\ - movel %3@+,d1\n\ - beq 3f\n\ - movel d1,d0\n\ - lsrl d2,d0\n\ - lsll #5,d0\n\ - lsll %7,d1\n\ - jmp a1@(d0:l)\n\ + movel %0,%/a0\n\ + addl %6,%0\n\ + movel %3@+,%/d1\n\ + jeq 3f\n\ + movel %/d1,%/d0\n\ + lsrl %/d2,%/d0\n\ + lsll #5,%/d0\n\ + lsll %2,%/d1\n\ + jmp %/a1@(%/d0:l)\n\ 2:\n\ - addl #4,a0\n\ - movel d1,d0\n\ - lsrl d3,d0\n\ - lsll #5,d0\n\ - lsll #4,d1\n\ - jmp a1@(d0:l)\n\ -0:\n\ - bne 2b ; dbra %1,1b ; bra 4f\n\ - . = 0b + 0x20\n\ - moveb %4,a0@(3)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f\n\ - . = 0b + 0x40\n\ - moveb %4,a0@(2)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f\n\ - . = 0b + 0x60\n\ - movew %4,a0@(2)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f\n\ - . = 0b + 0x80\n\ - moveb %4,a0@(1)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0xa0\n\ - moveb %4,a0@(3) ; moveb %4,a0@(1)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0xc0\n\ - movew %4,a0@(1)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0xe0\n\ - movew %4,a0@(2) ; moveb %4,a0@(1)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x100\n\ - moveb %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x120\n\ - moveb %4,a0@(3) ; moveb %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x140\n\ - moveb %4,a0@(2) ; moveb %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x160\n\ - movew %4,a0@(2) ; moveb %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x180\n\ - movew %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x1a0\n\ - moveb %4,a0@(3) ; movew %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x1c0\n\ - moveb %4,a0@(2) ; movew %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; dbra %1,1b ; bra 4f ;\n\ - . = 0b + 0x1e0\n\ - movel %4,a0@(0)\n\ - andl d1,d1 ; bne 2b ; \n\ + addl #4,%/a0\n\ + movel %/d1,%/d0\n\ + lsrl %/d3,%/d0\n\ + lsll #5,%/d0\n\ + lsll #4,%/d1\n\ + jmp %/a1@(%/d0:l)\n\ +5:\n\ + jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x20\n\ + moveb %5,%/a0@(3)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x40\n\ + moveb %5,%/a0@(2)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x60\n\ + movew %5,%/a0@(2)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x80\n\ + moveb %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0xa0\n\ + moveb %5,%/a0@(3) ; moveb %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0xc0\n\ + movew %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0xe0\n\ + movew %5,%/a0@(2) ; moveb %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x100\n\ + moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x120\n\ + moveb %5,%/a0@(3) ; moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x140\n\ + moveb %5,%/a0@(2) ; moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x160\n\ + movew %5,%/a0@(2) ; moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x180\n\ + movew %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x1a0\n\ + moveb %5,%/a0@(3) ; movew %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x1c0\n\ + moveb %5,%/a0@(2) ; movew %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x1e0\n\ + movel %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; \n\ 3: dbra %1,1b ; \n\ 4:\n"\ : "=a" (addr), /* %0 */ \ - "=d" (count) /* %1 */ \ - : "0" (addr), /* %2 */ \ - "a" (stipple), /* %3 */ \ - "d" (value), /* %4 */ \ - "a" (width), /* %5 */ \ - "1" (count), /* %6 */ \ - "d" (shift) /* %7 */ \ + "=d" (count), /* %1 */ \ + "=d" (shift), /* %2 */ \ + "=a" (stipple) /* %3 */ \ + : "0" (addr), /* %4 */ \ + "d" (value), /* %5 */ \ + "a" (width), /* %6 */ \ + "1" (count-1), /* %7 */ \ + "2" (shift), /* %8 */ \ + "3" (stipple) /* %9 */ \ : /* ctemp */ "d0", \ /* c */ "d1", \ /* lshift */ "d2", \ |