VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/stip68kgnu.h@ 78293

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 3.9 KB
Line 
1/*
2 * $Xorg: stip68kgnu.h,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $
3 *
4Copyright 1990, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25 *
26 * Author: Keith Packard, MIT X Consortium
27 */
28/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.3 2001/01/17 22:36:37 dawes Exp $ */
29
30/*
31 * Stipple stack macro for 68k GCC
32 */
33
34#define STIPPLE(addr,stipple,value,width,count,shift) \
35 __asm volatile ( \
36 "lea 5f,%/a1\n\
37 moveq #28,%/d2\n\
38 addl %2,%/d2\n\
39 moveq #28,%/d3\n\
40 subql #4,%2\n\
41 negl %2\n\
421:\n\
43 movel %0,%/a0\n\
44 addl %6,%0\n\
45 movel %3@+,%/d1\n\
46 jeq 3f\n\
47 movel %/d1,%/d0\n\
48 lsrl %/d2,%/d0\n\
49 lsll #5,%/d0\n\
50 lsll %2,%/d1\n\
51 jmp %/a1@(%/d0:l)\n\
522:\n\
53 addl #4,%/a0\n\
54 movel %/d1,%/d0\n\
55 lsrl %/d3,%/d0\n\
56 lsll #5,%/d0\n\
57 lsll #4,%/d1\n\
58 jmp %/a1@(%/d0:l)\n\
595:\n\
60 jne 2b ; dbra %1,1b ; jra 4f\n\
61 . = 5b + 0x20\n\
62 moveb %5,%/a0@(3)\n\
63 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\
64 . = 5b + 0x40\n\
65 moveb %5,%/a0@(2)\n\
66 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\
67 . = 5b + 0x60\n\
68 movew %5,%/a0@(2)\n\
69 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\
70 . = 5b + 0x80\n\
71 moveb %5,%/a0@(1)\n\
72 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
73 . = 5b + 0xa0\n\
74 moveb %5,%/a0@(3) ; moveb %5,%/a0@(1)\n\
75 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
76 . = 5b + 0xc0\n\
77 movew %5,%/a0@(1)\n\
78 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
79 . = 5b + 0xe0\n\
80 movew %5,%/a0@(2) ; moveb %5,%/a0@(1)\n\
81 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
82 . = 5b + 0x100\n\
83 moveb %5,%/a0@\n\
84 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
85 . = 5b + 0x120\n\
86 moveb %5,%/a0@(3) ; moveb %5,%/a0@\n\
87 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
88 . = 5b + 0x140\n\
89 moveb %5,%/a0@(2) ; moveb %5,%/a0@\n\
90 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
91 . = 5b + 0x160\n\
92 movew %5,%/a0@(2) ; moveb %5,%/a0@\n\
93 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
94 . = 5b + 0x180\n\
95 movew %5,%/a0@\n\
96 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
97 . = 5b + 0x1a0\n\
98 moveb %5,%/a0@(3) ; movew %5,%/a0@\n\
99 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
100 . = 5b + 0x1c0\n\
101 moveb %5,%/a0@(2) ; movew %5,%/a0@\n\
102 andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\
103 . = 5b + 0x1e0\n\
104 movel %5,%/a0@\n\
105 andl %/d1,%/d1 ; jne 2b ; \n\
1063: dbra %1,1b ; \n\
1074:\n"\
108 : "=a" (addr), /* %0 */ \
109 "=d" (count), /* %1 */ \
110 "=d" (shift), /* %2 */ \
111 "=a" (stipple) /* %3 */ \
112 : "0" (addr), /* %4 */ \
113 "d" (value), /* %5 */ \
114 "a" (width), /* %6 */ \
115 "1" (count-1), /* %7 */ \
116 "2" (shift), /* %8 */ \
117 "3" (stipple) /* %9 */ \
118 : /* ctemp */ "d0", \
119 /* c */ "d1", \
120 /* lshift */ "d2", \
121 /* rshift */ "d3", \
122 /* atemp */ "a0", \
123 /* case */ "a1")
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette