]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/hwinfo/src/x86emu/x86emu/prim_ops.h
Signierten GPG-Schluessel importiert.
[people/pmueller/ipfire-2.x.git] / src / hwinfo / src / x86emu / x86emu / prim_ops.h
CommitLineData
93afd047
MT
1/****************************************************************************
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 primitive operation functions.
36*
37****************************************************************************/
38
39#ifndef __X86EMU_PRIM_OPS_H
40#define __X86EMU_PRIM_OPS_H
41
42#include "x86emu/prim_asm.h"
43
44#ifdef __cplusplus
45extern "C" { /* Use "C" linkage when in C++ mode */
46#endif
47
48u16 aaa_word (u16 d);
49u16 aas_word (u16 d);
50u16 aad_word (u16 d);
51u16 aam_word (u8 d);
52u8 adc_byte (u8 d, u8 s);
53u16 adc_word (u16 d, u16 s);
54u32 adc_long (u32 d, u32 s);
55u8 add_byte (u8 d, u8 s);
56u16 add_word (u16 d, u16 s);
57u32 add_long (u32 d, u32 s);
58u8 and_byte (u8 d, u8 s);
59u16 and_word (u16 d, u16 s);
60u32 and_long (u32 d, u32 s);
61u8 cmp_byte (u8 d, u8 s);
62u16 cmp_word (u16 d, u16 s);
63u32 cmp_long (u32 d, u32 s);
64u8 daa_byte (u8 d);
65u8 das_byte (u8 d);
66u8 dec_byte (u8 d);
67u16 dec_word (u16 d);
68u32 dec_long (u32 d);
69u8 inc_byte (u8 d);
70u16 inc_word (u16 d);
71u32 inc_long (u32 d);
72u8 or_byte (u8 d, u8 s);
73u16 or_word (u16 d, u16 s);
74u32 or_long (u32 d, u32 s);
75u8 neg_byte (u8 s);
76u16 neg_word (u16 s);
77u32 neg_long (u32 s);
78u8 not_byte (u8 s);
79u16 not_word (u16 s);
80u32 not_long (u32 s);
81u8 rcl_byte (u8 d, u8 s);
82u16 rcl_word (u16 d, u8 s);
83u32 rcl_long (u32 d, u8 s);
84u8 rcr_byte (u8 d, u8 s);
85u16 rcr_word (u16 d, u8 s);
86u32 rcr_long (u32 d, u8 s);
87u8 rol_byte (u8 d, u8 s);
88u16 rol_word (u16 d, u8 s);
89u32 rol_long (u32 d, u8 s);
90u8 ror_byte (u8 d, u8 s);
91u16 ror_word (u16 d, u8 s);
92u32 ror_long (u32 d, u8 s);
93u8 shl_byte (u8 d, u8 s);
94u16 shl_word (u16 d, u8 s);
95u32 shl_long (u32 d, u8 s);
96u8 shr_byte (u8 d, u8 s);
97u16 shr_word (u16 d, u8 s);
98u32 shr_long (u32 d, u8 s);
99u8 sar_byte (u8 d, u8 s);
100u16 sar_word (u16 d, u8 s);
101u32 sar_long (u32 d, u8 s);
102u16 shld_word (u16 d, u16 fill, u8 s);
103u32 shld_long (u32 d, u32 fill, u8 s);
104u16 shrd_word (u16 d, u16 fill, u8 s);
105u32 shrd_long (u32 d, u32 fill, u8 s);
106u8 sbb_byte (u8 d, u8 s);
107u16 sbb_word (u16 d, u16 s);
108u32 sbb_long (u32 d, u32 s);
109u8 sub_byte (u8 d, u8 s);
110u16 sub_word (u16 d, u16 s);
111u32 sub_long (u32 d, u32 s);
112void test_byte (u8 d, u8 s);
113void test_word (u16 d, u16 s);
114void test_long (u32 d, u32 s);
115u8 xor_byte (u8 d, u8 s);
116u16 xor_word (u16 d, u16 s);
117u32 xor_long (u32 d, u32 s);
118void imul_byte (u8 s);
119void imul_word (u16 s);
120void imul_long (u32 s);
121void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s);
122void mul_byte (u8 s);
123void mul_word (u16 s);
124void mul_long (u32 s);
125void idiv_byte (u8 s);
126void idiv_word (u16 s);
127void idiv_long (u32 s);
128void div_byte (u8 s);
129void div_word (u16 s);
130void div_long (u32 s);
131void ins (int size);
132void outs (int size);
133u16 mem_access_word (int addr);
134void push_word (u16 w);
135void push_long (u32 w);
136u16 pop_word (void);
137u32 pop_long (void);
138
139#ifdef __cplusplus
140} /* End of "C" linkage for C++ */
141#endif
142
143#endif /* __X86EMU_PRIM_OPS_H */