Lines Matching +full:0 +full:- +full:2
1 /* SPDX-License-Identifier: GPL-2.0 */
15 * memset(_, 0, _). However their five instances add at least a kilobyte
22 * would be faster. I suspect not for simple text system - not much
30 * Unaligned read/write used requires 68020+ - think this is a problem?
52 return 0; in fb_memclear_small()
55 " lsr.l #1,%1 ; jcc 1f ; move.b %2,-(%0)\n" in fb_memclear_small()
56 "1: lsr.l #1,%1 ; jcc 1f ; move.w %2,-(%0)\n" in fb_memclear_small()
57 "1: lsr.l #1,%1 ; jcc 1f ; move.l %2,-(%0)\n" in fb_memclear_small()
58 "1: lsr.l #1,%1 ; jcc 1f ; move.l %2,-(%0) ; move.l %2,-(%0)\n" in fb_memclear_small()
61 : "d" (0), "0" ((char *)s + count), "1" (count)); in fb_memclear_small()
65 " move.l %2,%%d4; move.l %2,%%d5; move.l %2,%%d6\n" in fb_memclear_small()
66 "2: movem.l %2/%%d4/%%d5/%%d6,-(%0)\n" in fb_memclear_small()
67 " dbra %1,2b\n" in fb_memclear_small()
70 : "d" (0), "0" (s), "1" (count) in fb_memclear_small()
74 return 0; in fb_memclear_small()
81 return 0; in fb_memclear()
85 " lsr.l #1,%1 ; jcc 1f ; clr.b (%0)+\n" in fb_memclear()
86 "1: lsr.l #1,%1 ; jcc 1f ; clr.w (%0)+\n" in fb_memclear()
87 "1: lsr.l #1,%1 ; jcc 1f ; clr.l (%0)+\n" in fb_memclear()
88 "1: lsr.l #1,%1 ; jcc 1f ; clr.l (%0)+ ; clr.l (%0)+\n" in fb_memclear()
91 : "0" (s), "1" (count)); in fb_memclear()
95 " move.l %1,%2\n" in fb_memclear()
96 " lsr.l #1,%2 ; jcc 1f ; clr.b (%0)+ ; subq.w #1,%1\n" in fb_memclear()
97 " lsr.l #1,%2 ; jcs 2f\n" /* %0 increased=>bit 2 switched*/ in fb_memclear()
98 " clr.w (%0)+ ; subq.w #2,%1 ; jra 2f\n" in fb_memclear()
99 "1: lsr.l #1,%2 ; jcc 2f\n" in fb_memclear()
100 " clr.w (%0)+ ; subq.w #2,%1\n" in fb_memclear()
101 "2: move.w %1,%2; lsr.l #2,%1 ; jeq 6f\n" in fb_memclear()
102 " lsr.l #1,%1 ; jcc 3f ; clr.l (%0)+\n" in fb_memclear()
103 "3: lsr.l #1,%1 ; jcc 4f ; clr.l (%0)+ ; clr.l (%0)+\n" in fb_memclear()
105 "5: clr.l (%0)+; clr.l (%0)+ ; clr.l (%0)+ ; clr.l (%0)+\n" in fb_memclear()
107 "6: move.w %2,%1; btst #1,%1 ; jeq 7f ; clr.w (%0)+\n" in fb_memclear()
108 "7: btst #0,%1 ; jeq 8f ; clr.b (%0)+\n" in fb_memclear()
111 : "0" (s), "1" (count)); in fb_memclear()
114 return 0; in fb_memclear()
121 return 0; in fb_memset255()
124 " lsr.l #1,%1 ; jcc 1f ; move.b %2,-(%0)\n" in fb_memset255()
125 "1: lsr.l #1,%1 ; jcc 1f ; move.w %2,-(%0)\n" in fb_memset255()
126 "1: lsr.l #1,%1 ; jcc 1f ; move.l %2,-(%0)\n" in fb_memset255()
127 "1: lsr.l #1,%1 ; jcc 1f ; move.l %2,-(%0) ; move.l %2,-(%0)\n" in fb_memset255()
130 : "d" (-1), "0" ((char *)s+count), "1" (count)); in fb_memset255()
133 " move.l %2,%%d4; move.l %2,%%d5; move.l %2,%%d6\n" in fb_memset255()
134 "2: movem.l %2/%%d4/%%d5/%%d6,-(%0)\n" in fb_memset255()
135 " dbra %1,2b\n" in fb_memset255()
138 : "d" (-1), "0" (s), "1" (count) in fb_memset255()
141 return 0; in fb_memset255()
150 " lsr.l #1,%2 ; jcc 1f ; move.b (%1)+,(%0)+\n" in fb_memmove()
151 "1: lsr.l #1,%2 ; jcc 1f ; move.w (%1)+,(%0)+\n" in fb_memmove()
152 "1: lsr.l #1,%2 ; jcc 1f ; move.l (%1)+,(%0)+\n" in fb_memmove()
153 "1: lsr.l #1,%2 ; jcc 1f ; move.l (%1)+,(%0)+ ; move.l (%1)+,(%0)+\n" in fb_memmove()
156 : "0" (d), "1" (s), "2" (count)); in fb_memmove()
160 " move.l %0,%3\n" in fb_memmove()
161 " lsr.l #1,%3 ; jcc 1f ; move.b (%1)+,(%0)+ ; subqw #1,%2\n" in fb_memmove()
162 " lsr.l #1,%3 ; jcs 2f\n" /* %0 increased=>bit 2 switched*/ in fb_memmove()
163 " move.w (%1)+,(%0)+ ; subqw #2,%2 ; jra 2f\n" in fb_memmove()
164 "1: lsr.l #1,%3 ; jcc 2f\n" in fb_memmove()
165 " move.w (%1)+,(%0)+ ; subqw #2,%2\n" in fb_memmove()
166 "2: move.w %2,%-; lsr.l #2,%2 ; jeq 6f\n" in fb_memmove()
167 " lsr.l #1,%2 ; jcc 3f ; move.l (%1)+,(%0)+\n" in fb_memmove()
168 "3: lsr.l #1,%2 ; jcc 4f ; move.l (%1)+,(%0)+ ; move.l (%1)+,(%0)+\n" in fb_memmove()
169 "4: subq.l #1,%2 ; jcs 6f\n" in fb_memmove()
170 "5: move.l (%1)+,(%0)+; move.l (%1)+,(%0)+\n" in fb_memmove()
171 " move.l (%1)+,(%0)+; move.l (%1)+,(%0)+\n" in fb_memmove()
172 " dbra %2,5b ; clr.w %2; subq.l #1,%2; jcc 5b\n" in fb_memmove()
173 "6: move.w %+,%2; btst #1,%2 ; jeq 7f ; move.w (%1)+,(%0)+\n" in fb_memmove()
174 "7: btst #0,%2 ; jeq 8f ; move.b (%1)+,(%0)+\n" in fb_memmove()
177 : "0" (d), "1" (s), "2" (count)); in fb_memmove()
182 " lsr.l #1,%2 ; jcc 1f ; move.b -(%1),-(%0)\n" in fb_memmove()
183 "1: lsr.l #1,%2 ; jcc 1f ; move.w -(%1),-(%0)\n" in fb_memmove()
184 "1: lsr.l #1,%2 ; jcc 1f ; move.l -(%1),-(%0)\n" in fb_memmove()
185 "1: lsr.l #1,%2 ; jcc 1f ; move.l -(%1),-(%0) ; move.l -(%1),-(%0)\n" in fb_memmove()
188 : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)); in fb_memmove()
193 " move.l %0,%3\n" in fb_memmove()
194 " lsr.l #1,%3 ; jcc 1f ; move.b -(%1),-(%0) ; subqw #1,%2\n" in fb_memmove()
195 " lsr.l #1,%3 ; jcs 2f\n" /* %0 increased=>bit 2 switched*/ in fb_memmove()
196 " move.w -(%1),-(%0) ; subqw #2,%2 ; jra 2f\n" in fb_memmove()
197 "1: lsr.l #1,%3 ; jcc 2f\n" in fb_memmove()
198 " move.w -(%1),-(%0) ; subqw #2,%2\n" in fb_memmove()
199 "2: move.w %2,%-; lsr.l #2,%2 ; jeq 6f\n" in fb_memmove()
200 " lsr.l #1,%2 ; jcc 3f ; move.l -(%1),-(%0)\n" in fb_memmove()
201 "3: lsr.l #1,%2 ; jcc 4f ; move.l -(%1),-(%0) ; move.l -(%1),-(%0)\n" in fb_memmove()
202 "4: subq.l #1,%2 ; jcs 6f\n" in fb_memmove()
203 "5: move.l -(%1),-(%0); move.l -(%1),-(%0)\n" in fb_memmove()
204 " move.l -(%1),-(%0); move.l -(%1),-(%0)\n" in fb_memmove()
205 " dbra %2,5b ; clr.w %2; subq.l #1,%2; jcc 5b\n" in fb_memmove()
206 "6: move.w %+,%2; btst #1,%2 ; jeq 7f ; move.w -(%1),-(%0)\n" in fb_memmove()
207 "7: btst #0,%2 ; jeq 8f ; move.b -(%1),-(%0)\n" in fb_memmove()
210 : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)); in fb_memmove()
214 return 0; in fb_memmove()
226 "1: movem.l (%0)+,%%d0/%%d1/%%a0/%%a1\n" in fast_memmove()
229 " dbra %2,1b\n" in fast_memmove()
230 " clr.w %2; subq.l #1,%2\n" in fast_memmove()
233 : "0" (src), "1" (dst), "2" (size / 16 - 1) in fast_memmove()
237 "1: subq.l #8,%0; subq.l #8,%0\n" in fast_memmove()
238 " movem.l %0@,%%d0/%%d1/%%a0/%%a1\n" in fast_memmove()
239 " movem.l %%d0/%%d1/%%a0/%%a1,-(%1)\n" in fast_memmove()
240 " dbra %2,1b\n" in fast_memmove()
241 " clr.w %2; subq.l #1,%2\n" in fast_memmove()
244 : "0" (src + size), "1" (dst + size), "2" (size / 16 - 1) in fast_memmove()
255 0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff,
256 0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff,
257 0xff000000, 0xff0000ff, 0xff00ff00, 0xff00ffff,
258 0xffff0000, 0xffff00ff, 0xffffff00, 0xffffffff,
263 m[0] = four2long[c & 15]; in expand8_col2mask()
271 fgm[0] = four2long[fg & 15] ^ (bgm[0] = four2long[bg & 15]); in expand8_2col2mask()
282 u32 tmp = m[0]; in fill8_col()
283 dst[0] = tmp; in fill8_col()
284 dst[2] = (tmp >>= 8); in fill8_col()
285 #if BPL > 2 in fill8_col()
303 u32 fgm[2], bgm[2], tmp; in fill8_2col()
308 #if BPL > 2 in fill8_2col()
311 tmp = (mask & fgm[0]) ^ bgm[0]; in fill8_2col()
312 dst[0] = tmp; in fill8_2col()
313 dst[2] = (tmp >>= 8); in fill8_2col()
314 #if BPL > 2 in fill8_2col()
328 0x00000000, 0xffff0000, 0x0000ffff, 0xffffffff
333 m[0] = two2word[c & 3]; in expand16_col2mask()
334 #if BPL > 2 in expand16_col2mask()
335 m[1] = two2word[(c >> 2) & 3]; in expand16_col2mask()
338 m[2] = two2word[(c >> 4) & 3]; in expand16_col2mask()
345 bgm[0] = two2word[bg & 3]; in expand16_2col2mask()
346 fgm[0] = two2word[fg & 3] ^ bgm[0]; in expand16_2col2mask()
347 #if BPL > 2 in expand16_2col2mask()
348 bgm[1] = two2word[(bg >> 2) & 3]; in expand16_2col2mask()
349 fgm[1] = two2word[(fg >> 2) & 3] ^ bgm[1]; in expand16_2col2mask()
352 bgm[2] = two2word[(bg >> 4) & 3]; in expand16_2col2mask()
353 fgm[2] = two2word[(fg >> 4) & 3] ^ bgm[2]; in expand16_2col2mask()
362 *dst++ = m[0]; in fill16_col()
363 #if BPL > 2 in fill16_col()
367 *dst++ = m[2]; in fill16_col()
370 rows--; in fill16_col()
384 #if BPL > 2 in memmove32_col()
396 } while (--h); in memmove32_col()