blob: b1647c583c26896069a869a172c1683354720d2b [file] [log] [blame]
Stefan Reinauer38cd29e2009-08-11 21:28:25 +00001/****************************************************************************
2*
3* Realmode X86 Emulator Library
4*
5* Copyright (C) 1996-1999 SciTech Software, Inc.
6* Copyright (C) David Mosberger-Tang
7* Copyright (C) 1999 Egbert Eich
8*
9* ========================================================================
10*
11* Permission to use, copy, modify, distribute, and sell this software and
12* its documentation for any purpose is hereby granted without fee,
13* provided that the above copyright notice appear in all copies and that
14* both that copyright notice and this permission notice appear in
15* supporting documentation, and that the name of the authors not be used
16* in advertising or publicity pertaining to distribution of the software
17* without specific, written prior permission. The authors makes no
18* representations about the suitability of this software for any purpose.
19* It is provided "as is" without express or implied warranty.
20*
21* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
22* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
23* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
24* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
25* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27* PERFORMANCE OF THIS SOFTWARE.
28*
29* ========================================================================
30*
31* Language: ANSI C
32* Environment: Any
33* Developer: Kendall Bennett
34*
35* Description: Header file for system specific functions. These functions
Martin Roth63373ed2013-07-08 16:24:19 -060036* are always compiled and linked in the OS dependent libraries,
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000037* and never in a binary portable driver.
38*
39****************************************************************************/
40
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000041#ifndef __X86EMU_X86EMUI_H
42#define __X86EMU_X86EMUI_H
43
44/* If we are compiling in C++ mode, we can compile some functions as
45 * inline to increase performance (however the code size increases quite
46 * dramatically in this case).
47 */
48
Stefan Reinauerd8973602015-11-19 15:02:21 -080049#if defined(__cplusplus)
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000050#define _INLINE inline
51#else
52#define _INLINE static
53#endif
54
55/* Get rid of unused parameters in C++ compilation mode */
56
57#ifdef __cplusplus
58#define X86EMU_UNUSED(v)
59#else
Stefan Reinauer83628902010-08-23 18:43:27 +000060#define X86EMU_UNUSED(v) v __attribute__((unused))
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000061#endif
62
63#include "x86emu/x86emu.h"
64#include "x86emu/regs.h"
65#include "debug.h"
66#include "decode.h"
67#include "ops.h"
68#include "prim_ops.h"
69#include "fpu.h"
70#include "x86emu/fpu_regs.h"
71
72#ifdef IN_MODULE
73#include <xf86_ansic.h>
74#else
Stefan Reinauer14e22772010-04-27 06:56:47 +000075#endif
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000076/*--------------------------- Inline Functions ----------------------------*/
77
78#ifdef __cplusplus
79extern "C" { /* Use "C" linkage when in C++ mode */
80#endif
81
82extern u8 (X86APIP sys_rdb)(u32 addr);
83extern u16 (X86APIP sys_rdw)(u32 addr);
84extern u32 (X86APIP sys_rdl)(u32 addr);
85extern void (X86APIP sys_wrb)(u32 addr,u8 val);
86extern void (X86APIP sys_wrw)(u32 addr,u16 val);
87extern void (X86APIP sys_wrl)(u32 addr,u32 val);
88
89extern u8 (X86APIP sys_inb)(X86EMU_pioAddr addr);
90extern u16 (X86APIP sys_inw)(X86EMU_pioAddr addr);
91extern u32 (X86APIP sys_inl)(X86EMU_pioAddr addr);
92extern void (X86APIP sys_outb)(X86EMU_pioAddr addr,u8 val);
93extern void (X86APIP sys_outw)(X86EMU_pioAddr addr,u16 val);
94extern void (X86APIP sys_outl)(X86EMU_pioAddr addr,u32 val);
95
96#ifdef __cplusplus
97} /* End of "C" linkage for C++ */
98#endif
99
100#endif /* __X86EMU_X86EMUI_H */