[FAST486]
[reactos.git] / lib / fast486 / fpu.c
1 /*
2 * Fast486 386/486 CPU Emulation Library
3 * fpu.c
4 *
5 * Copyright (C) 2013 Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
21
22 /* INCLUDES *******************************************************************/
23
24 #include <windef.h>
25
26 // #define NDEBUG
27 #include <debug.h>
28
29 #include <fast486.h>
30 #include "common.h"
31 #include "opcodes.h"
32 #include "fpu.h"
33
34 /* PUBLIC FUNCTIONS ***********************************************************/
35
36 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8)
37 {
38 UCHAR Function;
39
40 /* Fetch the function number */
41 if (!Fast486FetchByte(State, &Function))
42 {
43 /* Exception occurred */
44 return FALSE;
45 }
46
47 FPU_CHECK();
48
49 #ifndef FAST486_NO_FPU
50 // TODO: NOT IMPLEMENTED
51 UNIMPLEMENTED;
52
53 return FALSE;
54 #else
55 /* Do nothing */
56 return TRUE;
57 #endif
58 }
59
60 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9)
61 {
62 UCHAR Function;
63
64 /* Fetch the function number */
65 if (!Fast486FetchByte(State, &Function))
66 {
67 /* Exception occurred */
68 return FALSE;
69 }
70
71 FPU_CHECK();
72
73 #ifndef FAST486_NO_FPU
74 // TODO: NOT IMPLEMENTED
75 UNIMPLEMENTED;
76
77 return FALSE;
78 #else
79 /* Do nothing */
80 return TRUE;
81 #endif
82 }
83
84 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA)
85 {
86 UCHAR Function;
87
88 /* Fetch the function number */
89 if (!Fast486FetchByte(State, &Function))
90 {
91 /* Exception occurred */
92 return FALSE;
93 }
94
95 FPU_CHECK();
96
97 #ifndef FAST486_NO_FPU
98 // TODO: NOT IMPLEMENTED
99 UNIMPLEMENTED;
100
101 return FALSE;
102 #else
103 /* Do nothing */
104 return TRUE;
105 #endif
106 }
107
108 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB)
109 {
110 UCHAR Function;
111
112 /* Fetch the function number */
113 if (!Fast486FetchByte(State, &Function))
114 {
115 /* Exception occurred */
116 return FALSE;
117 }
118
119 FPU_CHECK();
120
121 #ifndef FAST486_NO_FPU
122 // TODO: NOT IMPLEMENTED
123 UNIMPLEMENTED;
124
125 return FALSE;
126 #else
127 /* Do nothing */
128 return TRUE;
129 #endif
130 }
131
132 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC)
133 {
134 UCHAR Function;
135
136 /* Fetch the function number */
137 if (!Fast486FetchByte(State, &Function))
138 {
139 /* Exception occurred */
140 return FALSE;
141 }
142
143 FPU_CHECK();
144
145 #ifndef FAST486_NO_FPU
146 // TODO: NOT IMPLEMENTED
147 UNIMPLEMENTED;
148
149 return FALSE;
150 #else
151 /* Do nothing */
152 return TRUE;
153 #endif
154 }
155
156 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD)
157 {
158 UCHAR Function;
159
160 /* Fetch the function number */
161 if (!Fast486FetchByte(State, &Function))
162 {
163 /* Exception occurred */
164 return FALSE;
165 }
166
167 FPU_CHECK();
168
169 #ifndef FAST486_NO_FPU
170 // TODO: NOT IMPLEMENTED
171 UNIMPLEMENTED;
172
173 return FALSE;
174 #else
175 /* Do nothing */
176 return TRUE;
177 #endif
178 }
179
180 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE)
181 {
182 UCHAR Function;
183
184 /* Fetch the function number */
185 if (!Fast486FetchByte(State, &Function))
186 {
187 /* Exception occurred */
188 return FALSE;
189 }
190
191 FPU_CHECK();
192
193 #ifndef FAST486_NO_FPU
194 // TODO: NOT IMPLEMENTED
195 UNIMPLEMENTED;
196
197 return FALSE;
198 #else
199 /* Do nothing */
200 return TRUE;
201 #endif
202 }
203
204 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF)
205 {
206 UCHAR Function;
207
208 /* Fetch the function number */
209 if (!Fast486FetchByte(State, &Function))
210 {
211 /* Exception occurred */
212 return FALSE;
213 }
214
215 FPU_CHECK();
216
217 #ifndef FAST486_NO_FPU
218 // TODO: NOT IMPLEMENTED
219 UNIMPLEMENTED;
220
221 return FALSE;
222 #else
223 /* Do nothing */
224 return TRUE;
225 #endif
226 }
227
228 /* EOF */