2 * Fast486 386/486 CPU Emulation Library
5 * Copyright (C) 2013 Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
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.
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.
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.
27 /* DEFINES ********************************************************************/
29 #define FPU_CHECK() if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_EM) \
31 Fast486Exception(State, FAST486_EXCEPTION_NM); \
34 #define FPU_ST(i) State->FpuRegisters[(State->FpuStatus.Top + (i)) % FAST486_NUM_FPU_REGS]
38 FPU_SINGLE_PRECISION
= 0,
39 FPU_DOUBLE_PRECISION
= 2,
40 FPU_DOUBLE_EXT_PRECISION
= 3
51 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8
);
52 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9
);
53 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA
);
54 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB
);
55 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC
);
56 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD
);
57 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE
);
58 FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF
);