2 * $XConsortium: stipple68k.s,v 1.3 94/04/17 20:29:09 keith Exp $
3 * $XFree86: xc/programs/Xserver/cfb/stipple68k.s,v 3.0 1996/08/13 11:27:37 dawes Exp $
5 Copyright (c) 1990 X Consortium
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
28 * Author: Keith Packard, MIT X Consortium
32 * Stipple code for 68k processors
37 #define _cfbStippleStack cfbStippleStackTE
39 #define _cfbStippleStack cfbStippleStack
43 #define _cfbStippleStack _cfbStippleStackTE
62 #define PushMask #0x3e38
63 #define PopMask #0x1c7c
74 #define ForEachLine .L2
75 #define ForEachBits .L5
93 #define ForEachLine L2
94 #define ForEachBits L5
100 .globl _cfbStippleStack
104 movel sp@(arg1),stipple
105 movel sp@(arg2),value
106 movel sp@(arg3),stride
107 movew sp@(arg4+2),count
108 movel sp@(arg5),shift
109 subqw #1,count /* predecrement count */
123 /* Get first few bits */
126 lsll #CASE_SIZE,ctemp
127 lsll shift,c /* set up for next bits */
133 lsrl rshift,ctemp /* better than lsrl, andi */
134 lsll #CASE_SIZE,ctemp
135 lsll #4,c /* set up for next bits */
141 dbra count,ForEachLine ; \
142 moveml sp@+,PopMask ; \
146 jne ForEachBits /* 0 */
148 dbra count,ForEachLine
154 moveb value,atemp@(3) /* 1 */
159 moveb value,atemp@(2) /* 2 */
164 movew value,atemp@(2) /* 3 */
169 moveb value,atemp@(1) /* 4 */
174 moveb value,atemp@(3) /* 5 */
175 moveb value,atemp@(1)
180 movew value,atemp@(1) /* 6 */
185 movew value,atemp@(2) /* 7 */
186 moveb value,atemp@(1)
189 . = CaseBegin + 0x100
191 moveb value,atemp@ /* 8 */
194 . = CaseBegin + 0x120
196 moveb value,atemp@(3) /* 9 */
200 . = CaseBegin + 0x140
202 moveb value,atemp@(2) /* a */
206 . = CaseBegin + 0x160
208 movew value,atemp@(2) /* b */
212 . = CaseBegin + 0x180
214 movew value,atemp@ /* c */
217 . = CaseBegin + 0x1a0
219 moveb value,atemp@(3) /* d */
223 . = CaseBegin + 0x1c0
225 moveb value,atemp@(2) /* e */
229 . = CaseBegin + 0x1e0
231 movel value,atemp@ /* f */