xref: /OK3568_Linux_fs/external/xserver/hw/xfree86/os-support/solaris/solaris-ia32.S (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/ Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
2*4882a593Smuzhiyun/
3*4882a593Smuzhiyun/ Permission is hereby granted, free of charge, to any person obtaining a
4*4882a593Smuzhiyun/ copy of this software and associated documentation files (the "Software"),
5*4882a593Smuzhiyun/ to deal in the Software without restriction, including without limitation
6*4882a593Smuzhiyun/ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7*4882a593Smuzhiyun/ and/or sell copies of the Software, and to permit persons to whom the
8*4882a593Smuzhiyun/ Software is furnished to do so, subject to the following conditions:
9*4882a593Smuzhiyun/
10*4882a593Smuzhiyun/ The above copyright notice and this permission notice (including the next
11*4882a593Smuzhiyun/ paragraph) shall be included in all copies or substantial portions of the
12*4882a593Smuzhiyun/ Software.
13*4882a593Smuzhiyun/
14*4882a593Smuzhiyun/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*4882a593Smuzhiyun/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*4882a593Smuzhiyun/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*4882a593Smuzhiyun/ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18*4882a593Smuzhiyun/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19*4882a593Smuzhiyun/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20*4882a593Smuzhiyun/ DEALINGS IN THE SOFTWARE.
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun#ifdef INLINE_ASM
23*4882a593Smuzhiyun#define FUNCTION_START(f,n)	.inline f,n
24*4882a593Smuzhiyun#define FUNCTION_END(f)		.end
25*4882a593Smuzhiyun#else
26*4882a593Smuzhiyun#define _ASM
27*4882a593Smuzhiyun#include <sys/asm_linkage.h>
28*4882a593Smuzhiyun#define FUNCTION_START(f,n)	ENTRY(f)
29*4882a593Smuzhiyun#define FUNCTION_END(f)		ret; SET_SIZE(f)
30*4882a593Smuzhiyun#endif
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun	FUNCTION_START(inb,4)
33*4882a593Smuzhiyun	movl	(%esp), %edx
34*4882a593Smuzhiyun	xorl    %eax, %eax
35*4882a593Smuzhiyun	inb	(%dx)
36*4882a593Smuzhiyun	FUNCTION_END(inb)
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun	FUNCTION_START(inw,4)
39*4882a593Smuzhiyun	movl	(%esp), %edx
40*4882a593Smuzhiyun	xorl    %eax, %eax
41*4882a593Smuzhiyun	inw	(%dx)
42*4882a593Smuzhiyun	FUNCTION_END(inw)
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun	FUNCTION_START(inl,4)
45*4882a593Smuzhiyun	movl	(%esp), %edx
46*4882a593Smuzhiyun	xorl    %eax, %eax
47*4882a593Smuzhiyun	inl	(%dx)
48*4882a593Smuzhiyun	FUNCTION_END(inl)
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun	FUNCTION_START(outb,8)
51*4882a593Smuzhiyun	movl	(%esp), %edx
52*4882a593Smuzhiyun	movl    4(%esp), %eax
53*4882a593Smuzhiyun	outb	(%dx)
54*4882a593Smuzhiyun	FUNCTION_END(outb)
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun	FUNCTION_START(outw,8)
57*4882a593Smuzhiyun	movl	(%esp), %edx
58*4882a593Smuzhiyun	movl    4(%esp), %eax
59*4882a593Smuzhiyun	outw	(%dx)
60*4882a593Smuzhiyun	FUNCTION_END(outw)
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun	FUNCTION_START(outl,8)
63*4882a593Smuzhiyun	movl	(%esp), %edx
64*4882a593Smuzhiyun	movl    4(%esp), %eax
65*4882a593Smuzhiyun	outl	(%dx)
66*4882a593Smuzhiyun	FUNCTION_END(outl)
67*4882a593Smuzhiyun
68