aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/cfb/stipmips.s281
-rw-r--r--xorg-server/cfb/stipsparc.s290
-rw-r--r--xorg-server/cfb/stipsprc32.s291
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_inout.s124
4 files changed, 986 insertions, 0 deletions
diff --git a/xorg-server/cfb/stipmips.s b/xorg-server/cfb/stipmips.s
new file mode 100644
index 000000000..c42d9b5ae
--- /dev/null
+++ b/xorg-server/cfb/stipmips.s
@@ -0,0 +1,281 @@
+/*
+ * $Xorg: stipmips.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $
+ *
+Copyright 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+/*
+ * MIPS assembly code for optimized text rendering.
+ *
+ * Other stippling could be done in assembly, but the payoff is
+ * not nearly as large. Mostly because large areas are heavily
+ * optimized already.
+ */
+
+#ifdef MIPSEL
+# define BitsR sll
+# define BitsL srl
+# define BO(o) o
+# define HO(o) o
+# define WO(o) o
+# define FourBits(dest,bits) and dest, bits, 0xf
+#else
+# define BitsR srl
+# define BitsL sll
+# define BO(o) 3-o
+# define HO(o) 2-o
+# define WO(o) o
+# define FourBits(dest,bits) srl dest, bits, 28
+#endif
+
+/* reordering instructions would be fatal here */
+ .set noreorder
+
+
+/*
+ * cfbStippleStack(addr, stipple, value, stride, Count, Shift)
+ * 4 5 6 7 16(sp) 20(sp)
+ *
+ * Apply successive 32-bit stipples starting at addr, addr+stride, ...
+ *
+ * Used for text rendering, but only when no data could be lost
+ * when the stipple is shifted left by Shift bits
+ */
+/* arguments */
+#define addr $4
+#define stipple $5
+#define value $6
+#define stride $7
+#define Count 16($sp)
+#define Shift 20($sp)
+
+/* local variables */
+#define count $14
+#define shift $13
+#define atemp $12
+#define bits $11
+#define lshift $9
+#define sbase $8
+#define stemp $2
+
+#define CASE_SIZE 5 /* case blocks are 2^5 bytes each */
+#define CASE_MASK 0x1e0 /* first case mask */
+
+#define ForEachLine $200
+#define NextLine $201
+#define NextLine1 $202
+#define CaseBegin $203
+#define ForEachBits $204
+#define ForEachBits1 $205
+#define NextBits $206
+
+#ifdef TETEXT
+#define cfbStippleStack cfbStippleStackTE
+#endif
+
+ .globl cfbStippleStack
+ .ent cfbStippleStack 2
+cfbStippleStack:
+ .frame $sp, 0, $31
+ lw count, Count /* fetch stack params */
+ la sbase,CaseBegin /* load up switch table */
+ lw shift, Shift
+ li lshift, 4 /* compute offset within */
+ subu lshift, lshift, shift /* stipple of remaining bits */
+#ifdef MIPSEL
+ addu shift, shift, CASE_SIZE /* first shift for LSB */
+#else
+ addu shift, shift, 28-CASE_SIZE /* first shift for MSB */
+#endif
+ /* do ... while (--count > 0); */
+ForEachLine:
+ lw bits, 0(stipple) /* get stipple bits */
+ move atemp, addr /* set up for this line */
+#ifdef TETEXT
+ /* Terminal emulator fonts are expanded and have many 0 rows */
+ beqz bits, NextLine /* skip out early on 0 */
+#endif
+ addu addr, addr, stride /* step for the loop */
+ BitsR stemp, bits, shift /* get first bits */
+ and stemp, stemp, CASE_MASK /* compute first branch */
+ addu stemp, stemp, sbase /* ... */
+ j stemp /* ... */
+ BitsL bits, bits, lshift /* set remaining bits */
+
+ForEachBits:
+ addu atemp, atemp, 4
+ForEachBits1:
+ FourBits(stemp, bits) /* compute jump for */
+ sll stemp, stemp, CASE_SIZE /* next four bits */
+ addu stemp, stemp, sbase /* ... */
+ j stemp /* ... */
+ BitsL bits, bits, 4 /* step for remaining bits */
+CaseBegin:
+ bnez bits, ForEachBits1 /* 0 */
+ addu atemp, atemp, 4
+NextLine:
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ bnez bits, ForEachBits /* 1 */
+ sb value, BO(0)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ bnez bits, ForEachBits /* 2 */
+ sb value, BO(1)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ bnez bits, ForEachBits /* 3 */
+ sh value, HO(0)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ bnez bits, ForEachBits /* 4 */
+ sb value, BO(2)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ sb value, BO(0)(atemp) /* 5 */
+ bnez bits, ForEachBits
+ sb value, BO(2)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+
+ sb value, BO(1)(atemp) /* 6 */
+ bnez bits, ForEachBits
+ sb value, BO(2)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+
+ bnez bits, ForEachBits /* 7 */
+ swl value, BO(2)(atemp) /* untested on MSB */
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ bnez bits, ForEachBits /* 8 */
+ sb value, BO(3)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ sb value, BO(0)(atemp) /* 9 */
+ bnez bits, ForEachBits
+ sb value, BO(3)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+
+ sb value, BO(1)(atemp) /* a */
+ bnez bits, ForEachBits
+ sb value, BO(3)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+
+ sh value, HO(0)(atemp) /* b */
+ bnez bits, ForEachBits
+ sb value, BO(3)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+
+ bnez bits, ForEachBits /* c */
+ sh value, HO(2)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ sb value, BO(0)(atemp) /* d */
+ bnez bits, ForEachBits
+ sh value, HO(2)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+
+ bnez bits, ForEachBits /* e */
+ swr value, BO(1)(atemp) /* untested on MSB */
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ bnez bits, ForEachBits /* f */
+ sw value, WO(0)(atemp)
+ addu count, count, -1
+ bnez count, ForEachLine
+ addu stipple, stipple, 4
+ j $31
+ nop
+ nop
+
+ .end cfbStippleStack
diff --git a/xorg-server/cfb/stipsparc.s b/xorg-server/cfb/stipsparc.s
new file mode 100644
index 000000000..dcd440b19
--- /dev/null
+++ b/xorg-server/cfb/stipsparc.s
@@ -0,0 +1,290 @@
+/*
+ * $Xorg: stipsparc.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $
+ * $XdotOrg: $
+ *
+Copyright 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+/* $XFree86: xc/programs/Xserver/cfb/stipsparc.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */
+
+/*
+ * SPARC assembly code for optimized text rendering.
+ *
+ * Other stippling could be done in assembly, but the payoff is
+ * not nearly as large. Mostly because large areas are heavily
+ * optimized already.
+ */
+
+/* not that I expect to ever see an LSB SPARC, but ... */
+#ifdef LITTLE_ENDIAN
+# define BitsR sll
+# define BitsL srl
+# define BO(o) o
+# define HO(o) o
+# define WO(o) o
+# define FourBits(dest,bits) and bits, 0xf, dest
+#else
+# define BitsR srl
+# define BitsL sll
+# define BO(o) 3-o
+# define HO(o) 2-o
+# define WO(o) o
+# define FourBits(dest,bits) srl bits, 28, dest
+#endif
+
+/*
+ * cfbStippleStack(addr, stipple, value, stride, Count, Shift)
+ * 4 5 6 7 16(sp) 20(sp)
+ *
+ * Apply successive 32-bit stipples starting at addr, addr+stride, ...
+ *
+ * Used for text rendering, but only when no data could be lost
+ * when the stipple is shifted left by Shift bits
+ */
+/* arguments */
+#define addr %i0
+#define stipple %i1
+#define value %i2
+#define stride %i3
+#define count %i4
+#define shift %i5
+
+/* local variables */
+#define atemp %l0
+#define bits %l1
+#define lshift %l2
+#define sbase %l3
+#define stemp %l4
+
+#define CASE_SIZE 5 /* case blocks are 2^5 bytes each */
+#define CASE_MASK 0x1e0 /* first case mask */
+
+#define ForEachLine LY1
+#define NextLine LY2
+#define CaseBegin LY3
+#define ForEachBits LY4
+#define NextBits LY5
+
+#if defined(SVR4) || defined(__ELF__)
+#ifdef TETEXT
+#define _cfbStippleStack cfbStippleStackTE
+#else
+#define _cfbStippleStack cfbStippleStack
+#endif
+#else
+#ifdef TETEXT
+#define _cfbStippleStack _cfbStippleStackTE
+#endif
+#endif
+ .seg "text"
+ .proc 16
+ .globl _cfbStippleStack
+_cfbStippleStack:
+ save %sp,-64,%sp
+#ifdef SHAREDCODE
+1:
+ call 2f
+ nop
+2:
+ mov %o7,sbase /* sbase = 1b(1:) */
+ add sbase, CaseBegin-1b, sbase
+#else /* !SHAREDCODE */
+ sethi %hi(CaseBegin),sbase /* load up switch table */
+ or sbase,%lo(CaseBegin),sbase
+#endif /* SHAREDCODE */
+ mov 4,lshift /* compute offset within */
+ sub lshift, shift, lshift /* stipple of remaining bits */
+#ifdef LITTLE_ENDIAN
+ inc CASE_SIZE, shift /* first shift for LSB */
+#else
+ inc 28-CASE_SIZE, shift /* first shift for MSB */
+#endif
+ /* do ... while (--count > 0); */
+ForEachLine:
+ ld [stipple],bits /* get stipple bits */
+ mov addr,atemp /* set up for this line */
+#ifdef TETEXT
+ /* Terminal emulator fonts are expanded and have many 0 rows */
+ tst bits
+ bz NextLine /* skip out early on 0 */
+#endif
+ add addr, stride, addr /* step for the loop */
+ BitsR bits, shift, stemp /* get first bits */
+ and stemp, CASE_MASK, stemp /* compute first jump */
+ BitsL bits, lshift, bits /* set remaining bits */
+ jmp sbase+stemp /* ... */
+ tst bits
+
+ForEachBits:
+ inc 4, atemp
+ForEachBits1:
+ FourBits(stemp, bits) /* compute jump for */
+ sll stemp, CASE_SIZE, stemp /* these four bits */
+ BitsL bits, 4, bits /* step for remaining bits */
+ jmp sbase+stemp /* jump */
+ tst bits
+CaseBegin:
+ bnz,a ForEachBits1 /* 0 */
+ inc 4, atemp
+NextLine:
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ bnz ForEachBits /* 1 */
+ stb value, [atemp+BO(0)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ bnz ForEachBits /* 2 */
+ stb value, [atemp+BO(1)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ bnz ForEachBits /* 3 */
+ sth value, [atemp+HO(0)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ bnz ForEachBits /* 4 */
+ stb value, [atemp+BO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ stb value, [atemp+BO(0)] /* 5 */
+ bnz ForEachBits
+ stb value, [atemp+BO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ stb value, [atemp+BO(1)] /* 6 */
+ bnz ForEachBits
+ stb value, [atemp+BO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ sth value, [atemp+HO(0)] /* 7 */
+ bnz ForEachBits
+ stb value, [atemp+BO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ bnz ForEachBits /* 8 */
+ stb value, [atemp+BO(3)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ stb value, [atemp+BO(0)] /* 9 */
+ bnz ForEachBits
+ stb value, [atemp+BO(3)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ stb value, [atemp+BO(1)] /* a */
+ bnz ForEachBits
+ stb value, [atemp+BO(3)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ sth value, [atemp+HO(0)] /* b */
+ bnz ForEachBits
+ stb value, [atemp+BO(3)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ bnz ForEachBits /* c */
+ sth value, [atemp+HO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ stb value, [atemp+BO(0)] /* d */
+ bnz ForEachBits
+ sth value, [atemp+HO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ stb value, [atemp+BO(1)] /* e */
+ bnz ForEachBits
+ sth value, [atemp+HO(2)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ bnz ForEachBits /* f */
+ st value, [atemp+WO(0)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
diff --git a/xorg-server/cfb/stipsprc32.s b/xorg-server/cfb/stipsprc32.s
new file mode 100644
index 000000000..89b031f5a
--- /dev/null
+++ b/xorg-server/cfb/stipsprc32.s
@@ -0,0 +1,291 @@
+/*
+ * $Xorg: stipsprc32.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $
+ * $XdotOrg: $
+ *
+Copyright 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+/* $XFree86: xc/programs/Xserver/cfb/stipsprc32.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */
+
+/*
+ * SPARC assembly code for optimized text rendering.
+ *
+ * Other stippling could be done in assembly, but the payoff is
+ * not nearly as large. Mostly because large areas are heavily
+ * optimized already.
+ */
+
+/* not that I expect to ever see an LSB SPARC, but ... */
+#ifdef LITTLE_ENDIAN
+# define BitsR sll
+# define BitsL srl
+# define WO(o) 3-o
+# define FourBits(dest,bits) and bits, 0xf, dest
+#else
+# define BitsR srl
+# define BitsL sll
+# define WO(o) o
+# define FourBits(dest,bits) srl bits, 28, dest
+#endif
+
+/*
+ * cfb32StippleStack(addr, stipple, value, stride, Count, Shift)
+ * 4 5 6 7 16(sp) 20(sp)
+ *
+ * Apply successive 32-bit stipples starting at addr, addr+stride, ...
+ *
+ * Used for text rendering, but only when no data could be lost
+ * when the stipple is shifted left by Shift bits
+ */
+/* arguments */
+#define addr %i0
+#define stipple %i1
+#define value %i2
+#define stride %i3
+#define count %i4
+#define shift %i5
+
+/* local variables */
+#define atemp %l0
+#define bits %l1
+#define lshift %l2
+#define sbase %l3
+#define stemp %l4
+
+#define CASE_SIZE 5 /* case blocks are 2^5 bytes each */
+#define CASE_MASK 0x1e0 /* first case mask */
+
+#define ForEachLine LY1
+#define NextLine LY2
+#define CaseBegin LY3
+#define ForEachBits LY4
+#define NextBits LY5
+
+#if defined(SVR4) || defined(__ELF__)
+#ifdef TETEXT
+#define _cfb32StippleStack cfb32StippleStackTE
+#else
+#define _cfb32StippleStack cfb32StippleStack
+#endif
+#else
+#ifdef TETEXT
+#define _cfb32StippleStack _cfb32StippleStackTE
+#endif
+#endif
+
+ .seg "text"
+ .proc 16
+ .globl _cfb32StippleStack
+_cfb32StippleStack:
+ save %sp,-64,%sp
+#ifdef SHAREDCODE
+1:
+ call 2f
+ nop
+2:
+ mov %o7,sbase /* sbase = 1b(1:) */
+ add sbase, CaseBegin-1b, sbase
+#else /* !SHAREDCODE */
+ sethi %hi(CaseBegin),sbase /* load up switch table */
+ or sbase,%lo(CaseBegin),sbase
+#endif /* !SHAREDCODE */
+ mov 4,lshift /* compute offset within */
+ sub lshift, shift, lshift /* stipple of remaining bits */
+#ifdef LITTLE_ENDIAN
+ inc CASE_SIZE, shift /* first shift for LSB */
+#else
+ inc 28-CASE_SIZE, shift /* first shift for MSB */
+#endif
+ /* do ... while (--count > 0); */
+ForEachLine:
+ ld [stipple],bits /* get stipple bits */
+ mov addr,atemp /* set up for this line */
+#ifdef TETEXT
+ /* Terminal emulator fonts are expanded and have many 0 rows */
+ tst bits
+ bz NextLine /* skip out early on 0 */
+#endif
+ add addr, stride, addr /* step for the loop */
+ BitsR bits, shift, stemp /* get first bits */
+ and stemp, CASE_MASK, stemp /* compute first jump */
+ BitsL bits, lshift, bits /* set remaining bits */
+ jmp sbase+stemp /* ... */
+ tst bits
+
+ForEachBits:
+ inc 16, atemp
+ForEachBits1:
+ FourBits(stemp, bits) /* compute jump for */
+ sll stemp, CASE_SIZE, stemp /* these four bits */
+ BitsL bits, 4, bits /* step for remaining bits */
+ jmp sbase+stemp /* jump */
+ tst bits
+CaseBegin:
+ bnz,a ForEachBits1 /* 0 */
+ inc 16, atemp
+NextLine:
+ deccc 1, count
+NextLine1:
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ bnz ForEachBits /* 1 */
+ st value, [atemp+WO(12)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ bnz ForEachBits /* 2 */
+ st value, [atemp+WO(8)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ st value, [atemp+WO(8)] /* 3 */
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ bnz ForEachBits /* 4 */
+ st value, [atemp+WO(4)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ st value, [atemp+WO(4)] /* 5 */
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ st value, [atemp+WO(4)] /* 6 */
+ bnz ForEachBits
+ st value, [atemp+WO(8)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ st value, [atemp+WO(4)] /* 7 */
+ st value, [atemp+WO(8)]
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ b NextLine1
+ deccc 1, count
+ nop
+ nop
+
+ bnz ForEachBits /* 8 */
+ st value, [atemp+WO(0)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+ nop
+
+ st value, [atemp+WO(0)] /* 9 */
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ st value, [atemp+WO(0)] /* a */
+ bnz ForEachBits
+ st value, [atemp+WO(8)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ st value, [atemp+WO(0)] /* b */
+ st value, [atemp+WO(8)]
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ b NextLine1
+ deccc 1, count
+ nop
+ nop
+
+ st value, [atemp+WO(0)] /* c */
+ bnz ForEachBits
+ st value, [atemp+WO(4)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
+
+ st value, [atemp+WO(0)] /* d */
+ st value, [atemp+WO(4)]
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ b NextLine1
+ deccc 1, count
+ nop
+ nop
+
+ st value, [atemp+WO(0)] /* e */
+ st value, [atemp+WO(4)]
+ bnz ForEachBits
+ st value, [atemp+WO(8)]
+ b NextLine1
+ deccc 1, count
+ nop
+ nop
+
+ st value, [atemp+WO(0)] /* f */
+ st value, [atemp+WO(4)]
+ st value, [atemp+WO(8)]
+ bnz ForEachBits
+ st value, [atemp+WO(12)]
+ deccc 1, count
+ bnz,a ForEachLine
+ inc 4, stipple
+ ret
+ restore
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s b/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s
new file mode 100644
index 000000000..e8f03d0e8
--- /dev/null
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_inout.s
@@ -0,0 +1,124 @@
+/ $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_inout.s,v 1.1 2001/05/28 02:42:31 tsi Exp $
+/
+/ Copyright 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
+/
+/ Permission is hereby granted, free of charge, to any person obtaining a copy
+/ of this software and associated documentation files (the "Software"), to deal
+/ in the Software without restriction, including without limitation the rights
+/ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+/ copies of the Software, and to permit persons to whom the Software is
+/ furnished to do so, subject to the following conditions:
+/
+/ The above copyright notice and this permission notice shall be included in
+/ all copies or substantial portions of the Software.
+/
+/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+/ XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+/ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+/ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+/
+/ Except as contained in this notice, the name of the XFree86 Project shall not
+/ be used in advertising or otherwise to promote the sale, use or other
+/ dealings in this Software without prior written authorization from the
+/ XFree86 Project.
+/
+/
+/ File: sun_inout.s
+/
+/ Purpose: Provide inb(), inw(), inl(), outb(), outw(), outl() functions
+/ for Solaris x86 using the ProWorks compiler by SunPro
+/
+/ Author: Installed into XFree86 SuperProbe by Doug Anson (danson@lgc.com)
+/ Portions donated to XFree86 by Steve Dever (Steve.Dever@Eng.Sun.Com)
+/
+/ Synopsis: (c callable external declarations)
+/ extern unsigned char inb(int port);
+/ extern unsigned short inw(int port);
+/ extern unsigned long inl(int port);
+/ extern void outb(int port, unsigned char value);
+/ extern void outw(int port, unsigned short value);
+/ extern void outl(int port, unsigned long value);
+/
+
+.file "sunos_inout.s"
+.text
+
+.globl inb
+.globl inw
+.globl inl
+.globl outb
+.globl outw
+.globl outl
+
+/
+/ unsigned char inb(int port);
+/
+.align 4
+inb:
+ movl 4(%esp),%edx
+ subl %eax,%eax
+ inb (%dx)
+ ret
+.type inb,@function
+.size inb,.-inb
+
+/
+/ unsigned short inw(int port);
+/
+.align 4
+inw:
+ movl 4(%esp),%edx
+ subl %eax,%eax
+ inw (%dx)
+ ret
+.type inw,@function
+.size inw,.-inw
+
+/
+/ unsigned long inl(int port);
+/
+.align 4
+inl:
+ movl 4(%esp),%edx
+ inl (%dx)
+ ret
+.type inl,@function
+.size inl,.-inl
+
+/
+/ void outb(int port, unsigned char value);
+/
+.align 4
+outb:
+ movl 4(%esp),%edx
+ movl 8(%esp),%eax
+ outb (%dx)
+ ret
+.type outb,@function
+.size outb,.-outb
+
+/
+/ void outw(int port, unsigned short value);
+/
+.align 4
+outw:
+ movl 4(%esp),%edx
+ movl 8(%esp),%eax
+ outw (%dx)
+ ret
+.type outw,@function
+.size outw,.-outw
+
+/
+/ void outl(int port, unsigned long value);
+/
+.align 4
+outl:
+ movl 4(%esp),%edx
+ movl 8(%esp),%eax
+ outl (%dx)
+ ret
+.type outl,@function
+.size outl,.-outl