libhd
5.0
|
00001 /**************************************************************************** 00002 * 00003 * Realmode X86 Emulator Library 00004 * 00005 * Copyright (C) 1996-1999 SciTech Software, Inc. 00006 * Copyright (C) David Mosberger-Tang 00007 * Copyright (C) 1999 Egbert Eich 00008 * 00009 * ======================================================================== 00010 * 00011 * Permission to use, copy, modify, distribute, and sell this software and 00012 * its documentation for any purpose is hereby granted without fee, 00013 * provided that the above copyright notice appear in all copies and that 00014 * both that copyright notice and this permission notice appear in 00015 * supporting documentation, and that the name of the authors not be used 00016 * in advertising or publicity pertaining to distribution of the software 00017 * without specific, written prior permission. The authors makes no 00018 * representations about the suitability of this software for any purpose. 00019 * It is provided "as is" without express or implied warranty. 00020 * 00021 * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 00022 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 00023 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 00024 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 00025 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00026 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00027 * PERFORMANCE OF THIS SOFTWARE. 00028 * 00029 * ======================================================================== 00030 * 00031 * Language: ANSI C 00032 * Environment: Any 00033 * Developer: Kendall Bennett 00034 * 00035 * Description: Header file for system specific functions. These functions 00036 * are always compiled and linked in the OS depedent libraries, 00037 * and never in a binary portable driver. 00038 * 00039 ****************************************************************************/ 00040 00041 /* $XFree86: xc/extras/x86emu/src/x86emu/x86emu/x86emui.h,v 1.3 2000/04/17 16:29:47 eich Exp $ */ 00042 00043 #ifndef __X86EMU_X86EMUI_H 00044 #define __X86EMU_X86EMUI_H 00045 00046 /* If we are compiling in C++ mode, we can compile some functions as 00047 * inline to increase performance (however the code size increases quite 00048 * dramatically in this case). 00049 */ 00050 00051 #if defined(__cplusplus) && !defined(_NO_INLINE) 00052 #define _INLINE inline 00053 #else 00054 #define _INLINE static 00055 #endif 00056 00057 /* Get rid of unused parameters in C++ compilation mode */ 00058 00059 #ifdef __cplusplus 00060 #define X86EMU_UNUSED(v) 00061 #else 00062 #define X86EMU_UNUSED(v) v 00063 #endif 00064 00065 #include "x86emu.h" 00066 #include "x86emu/regs.h" 00067 #include "x86emu/debug.h" 00068 #include "x86emu/decode.h" 00069 #include "x86emu/ops.h" 00070 #include "x86emu/prim_ops.h" 00071 #include "x86emu/fpu.h" 00072 #include "x86emu/fpu_regs.h" 00073 00074 #ifdef IN_MODULE 00075 #include <xf86_ansic.h> 00076 #else 00077 #include <stdio.h> 00078 #include <stdlib.h> 00079 #include <string.h> 00080 #endif 00081 /*--------------------------- Inline Functions ----------------------------*/ 00082 00083 #ifdef __cplusplus 00084 extern "C" { /* Use "C" linkage when in C++ mode */ 00085 #endif 00086 00087 extern u8 (X86APIP sys_rdb)(u32 addr); 00088 extern u16 (X86APIP sys_rdw)(u32 addr); 00089 extern u32 (X86APIP sys_rdl)(u32 addr); 00090 extern void (X86APIP sys_wrb)(u32 addr,u8 val); 00091 extern void (X86APIP sys_wrw)(u32 addr,u16 val); 00092 extern void (X86APIP sys_wrl)(u32 addr,u32 val); 00093 00094 extern u8 (X86APIP sys_inb)(X86EMU_pioAddr addr); 00095 extern u16 (X86APIP sys_inw)(X86EMU_pioAddr addr); 00096 extern u32 (X86APIP sys_inl)(X86EMU_pioAddr addr); 00097 extern void (X86APIP sys_outb)(X86EMU_pioAddr addr,u8 val); 00098 extern void (X86APIP sys_outw)(X86EMU_pioAddr addr,u16 val); 00099 extern void (X86APIP sys_outl)(X86EMU_pioAddr addr,u32 val); 00100 00101 #ifdef __cplusplus 00102 } /* End of "C" linkage for C++ */ 00103 #endif 00104 00105 #endif /* __X86EMU_X86EMUI_H */