3 $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $
4 Modified for readability by Nick Kurshev
7 * (c) Copyright 1993,1994 by David Wexelblat <dwex@xfree86.org>
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * DAVID WEXELBLAT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * Except as contained in this notice, the name of David Wexelblat shall not be
28 * used in advertising or otherwise to promote the sale, use or other dealings
29 * in this Software without prior written authorization from David Wexelblat.
33 * Digital Equipment Corporation. All rights reserved.
34 * This software is furnished under license and may be used and copied only in
35 * accordance with the following terms and conditions. Subject to these
36 * conditions, you may download, copy, install, use, modify and distribute
37 * this software in source and/or binary form. No title or ownership is
40 * 1) Any source code used, modified or distributed must reproduce and retain
41 * this copyright notice and list of conditions as they appear in the source
44 * 2) No right is granted to use any trade name, trademark, or logo of Digital
45 * Equipment Corporation. Neither the "Digital Equipment Corporation" name
46 * nor any trademark or logo of Digital Equipment Corporation may be used
47 * to endorse or promote products derived from this software without the
48 * prior written permission of Digital Equipment Corporation.
50 * 3) This software is provided "AS-IS" and any express or implied warranties,
51 * including but not limited to, any implied warranties of merchantability,
52 * fitness for a particular purpose, or non-infringement are disclaimed. In
53 * no event shall DIGITAL be liable for any damages whatsoever, and in
54 * particular, DIGITAL shall not be liable for special, indirect,
55 * consequential, or incidental damages or damages for
56 * lost profits, loss of revenue or loss of use, whether such damages arise
58 * negligence, tort, under statute, in equity, at law or otherwise, even if
59 * advised of the possibility of such damage.
62 #ifndef MPLAYER_ASMMACROS_POWERPC_H
63 #define MPLAYER_ASMMACROS_POWERPC_H
65 #if defined(Lynx) || defined(__OpenBSD__)
67 extern unsigned char *ioBase
;
69 static __inline__
volatile void eieio(void)
71 __asm__
volatile ("eieio");
74 static __inline__
void outb(short port
, unsigned char value
)
76 *(unsigned char *)(ioBase
+ port
) = value
; eieio();
79 static __inline__
void outw(short port
, unsigned short value
)
81 *(unsigned short *)(ioBase
+ port
) = value
; eieio();
84 static __inline__
void outl(short port
, unsigned short value
)
86 *(unsigned long *)(ioBase
+ port
) = value
; eieio();
89 static __inline__
unsigned char inb(short port
)
92 val
= *((unsigned char *)(ioBase
+ port
)); eieio();
96 static __inline__
unsigned short inw(short port
)
99 val
= *((unsigned short *)(ioBase
+ port
)); eieio();
103 static __inline__
unsigned long inl(short port
)
106 val
= *((unsigned long *)(ioBase
+ port
)); eieio();
110 #define intr_disable()
111 #define intr_enable()
115 #endif /* MPLAYER_ASMMACROS_POWERPC_H */