summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/misc/PortIO.S
blob: 75db31156a0df3ea8aea8673e4784fa93eb5f09e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* $XFree86$ */

/* Port I/O functions for platforms with no inlining. */

#include "assyntax.h"

	FILE("PortIO.s")

	AS_BEGIN

	GLOBL	GLNAME(outb)
	GLOBL	GLNAME(outw)
	GLOBL	GLNAME(outl)
	GLOBL	GLNAME(inb)
	GLOBL	GLNAME(inw)
	GLOBL	GLNAME(inl)

	SEG_TEXT
	ALIGNTEXT4
GLNAME(outb):
	MOV_L	(REGOFF(4,ESP), EDX)
	MOV_L	(REGOFF(8,ESP), EAX)
	OUT_B
	RET

	ALIGNTEXT4
GLNAME(outw):
	MOV_L	(REGOFF(4,ESP), EDX)
	MOV_L	(REGOFF(8,ESP), EAX)
	OUT_W
	RET

	ALIGNTEXT4
GLNAME(outl):
	MOV_L	(REGOFF(4,ESP), EDX)
	MOV_L	(REGOFF(8,ESP), EAX)
	OUT_L
	RET

	ALIGNTEXT4
GLNAME(inb):
	MOV_L	(REGOFF(4,ESP), EDX)
	IN_B
	RET

	ALIGNTEXT4
GLNAME(inw):
	MOV_L	(REGOFF(4,ESP), EDX)
	IN_L
	RET

	ALIGNTEXT4
GLNAME(inl):
	MOV_L	(REGOFF(4,ESP), EDX)
	IN_L
	RET