summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/misc/PortIO.S
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/os-support/misc/PortIO.S')
-rw-r--r--hw/xfree86/os-support/misc/PortIO.S62
1 files changed, 61 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/misc/PortIO.S b/hw/xfree86/os-support/misc/PortIO.S
index 75db31156..e919c05e7 100644
--- a/hw/xfree86/os-support/misc/PortIO.S
+++ b/hw/xfree86/os-support/misc/PortIO.S
@@ -1,7 +1,9 @@
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/PortIO.S,v 1.2 2004/03/05 04:02:14 dawes Exp $ */
/* Port I/O functions for platforms with no inlining. */
+#if defined(i386)
+
#include "assyntax.h"
FILE("PortIO.s")
@@ -55,3 +57,61 @@ GLNAME(inl):
IN_L
RET
+#elif defined(sparc)
+
+#ifndef ASI_PL
+#define ASI_PL 136
+#endif
+
+ .file "PortIO.s"
+
+ .global outb
+ .global outw
+ .global outl
+ .global inb
+ .global inw
+ .global inl
+
+ .section ".text"
+
+ .align 4
+outb:
+ stba %o1, [%o0] ASI_PL
+ membar 10
+ retl
+ nop
+
+ .align 4
+outw:
+ stha %o1, [%o0] ASI_PL
+ membar 10
+ retl
+ nop
+
+ .align 4
+outl:
+ sta %o1, [%o0] ASI_PL
+ membar 10
+ retl
+ nop
+
+ .align 4
+inb:
+ lduba [%o0] ASI_PL, %o0
+ retl
+ nop
+
+ .align 4
+inw:
+ lduha [%o0] ASI_PL, %o0
+ retl
+ nop
+
+ .align 4
+inl:
+ lda [%o0] ASI_PL, %o0
+ retl
+ nop
+
+#endif
+