1 /////////////////////////////////////////////////////////////////////////
2 // $Id: fpu_emu.cc,v 1.8 2008/04/03 18:13:26 sshwarts Exp $
3 /////////////////////////////////////////////////////////////////////////
5 // Copyright (c) 2004 Stanislav Shwartsman
6 // Written by Stanislav Shwartsman [sshwarts at sourceforge net]
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 /////////////////////////////////////////////////////////////////////////
23 #define NEED_CPU_REG_SHORTCUTS 1
26 #define LOG_THIS BX_CPU_THIS_PTR
29 void BX_CPP_AttrRegparmN(1) BX_CPU_C::FWAIT(bxInstruction_c
*i
)
32 if (BX_CPU_THIS_PTR cr0
.get_TS() && BX_CPU_THIS_PTR cr0
.get_MP())
33 exception(BX_NM_EXCEPTION
, 0, 0);
35 BX_CPU_THIS_PTR
FPU_check_pending_exceptions();
37 BX_INFO(("FWAIT: requred FPU, use --enable-fpu"));
41 /* relevant only when FPU support is disabled */
42 #if BX_SUPPORT_FPU == 0
43 void BX_CPP_AttrRegparmN(1) BX_CPU_C::FPU_ESC(bxInstruction_c
*i
)
45 if (BX_CPU_THIS_PTR cr0
.get_EM() || BX_CPU_THIS_PTR cr0
.get_TS())
46 exception(BX_NM_EXCEPTION
, 0, 0);