65fea56f17cd614bc8908264df980a62e1931468vboxsync/****************************************************************************
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Realmode X86 Emulator Library
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Copyright (C) 1996-1999 SciTech Software, Inc.
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Copyright (C) David Mosberger-Tang
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Copyright (C) 1999 Egbert Eich
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* ========================================================================
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Permission to use, copy, modify, distribute, and sell this software and
65fea56f17cd614bc8908264df980a62e1931468vboxsync* its documentation for any purpose is hereby granted without fee,
65fea56f17cd614bc8908264df980a62e1931468vboxsync* provided that the above copyright notice appear in all copies and that
65fea56f17cd614bc8908264df980a62e1931468vboxsync* both that copyright notice and this permission notice appear in
65fea56f17cd614bc8908264df980a62e1931468vboxsync* supporting documentation, and that the name of the authors not be used
65fea56f17cd614bc8908264df980a62e1931468vboxsync* in advertising or publicity pertaining to distribution of the software
65fea56f17cd614bc8908264df980a62e1931468vboxsync* without specific, written prior permission. The authors makes no
65fea56f17cd614bc8908264df980a62e1931468vboxsync* representations about the suitability of this software for any purpose.
65fea56f17cd614bc8908264df980a62e1931468vboxsync* It is provided "as is" without express or implied warranty.
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
65fea56f17cd614bc8908264df980a62e1931468vboxsync* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
65fea56f17cd614bc8908264df980a62e1931468vboxsync* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync* PERFORMANCE OF THIS SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* ========================================================================
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Language: ANSI C
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Environment: Any
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Developer: Kendall Bennett
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync* Description: Header file for system specific functions. These functions
65fea56f17cd614bc8908264df980a62e1931468vboxsync* are always compiled and linked in the OS depedent libraries,
65fea56f17cd614bc8908264df980a62e1931468vboxsync* and never in a binary portable driver.
65fea56f17cd614bc8908264df980a62e1931468vboxsync*
65fea56f17cd614bc8908264df980a62e1931468vboxsync****************************************************************************/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef __X86EMU_X86EMUI_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __X86EMU_X86EMUI_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* If we are compiling in C++ mode, we can compile some functions as
65fea56f17cd614bc8908264df980a62e1931468vboxsync * inline to increase performance (however the code size increases quite
65fea56f17cd614bc8908264df980a62e1931468vboxsync * dramatically in this case).
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if defined(__cplusplus) && !defined(_NO_INLINE)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _INLINE inline
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _INLINE static
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Get rid of unused parameters in C++ compilation mode */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef __cplusplus
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define X86EMU_UNUSED(v)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define X86EMU_UNUSED(v) v
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/regs.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/debug.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/decode.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/ops.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/prim_ops.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/fpu.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "x86emu/fpu_regs.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef NO_SYS_HEADERS
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <stdio.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <stdlib.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <string.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* avoid conflicts with Solaris sys/regset.h */
65fea56f17cd614bc8908264df980a62e1931468vboxsync# if defined(__sun) && defined(CS)
65fea56f17cd614bc8908264df980a62e1931468vboxsync# undef CS
65fea56f17cd614bc8908264df980a62e1931468vboxsync# undef DS
65fea56f17cd614bc8908264df980a62e1931468vboxsync# undef SS
65fea56f17cd614bc8908264df980a62e1931468vboxsync# undef ES
65fea56f17cd614bc8908264df980a62e1931468vboxsync# undef FS
65fea56f17cd614bc8908264df980a62e1931468vboxsync# undef GS
65fea56f17cd614bc8908264df980a62e1931468vboxsync# endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* NO_SYS_HEADERS */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*--------------------------- Inline Functions ----------------------------*/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef __cplusplus
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern "C" { /* Use "C" linkage when in C++ mode */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern u8(X86APIP sys_rdb) (u32 addr);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern u16(X86APIP sys_rdw) (u32 addr);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern u32(X86APIP sys_rdl) (u32 addr);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern void (X86APIP sys_wrb) (u32 addr, u8 val);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern void (X86APIP sys_wrw) (u32 addr, u16 val);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern void (X86APIP sys_wrl) (u32 addr, u32 val);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val);
65fea56f17cd614bc8908264df980a62e1931468vboxsync extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef __cplusplus
65fea56f17cd614bc8908264df980a62e1931468vboxsync} /* End of "C" linkage for C++ */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* __X86EMU_X86EMUI_H */