2 NetWinder Floating Point Emulator
3 (c) Rebel.com, 1998-1999
5 Direct questions, comments to Scott Bambrough <scottb@netwinder.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (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., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include "fpsr.h" /* FP control and status register definitions */
27 #include "softfloat.h"
30 #define typeSingle 0x01
31 #define typeDouble 0x02
32 #define typeExtended 0x03
34 typedef struct tagFPREG
{
43 /* FPA11 device model */
44 typedef struct tagFPA11
{
45 int initflag
; /* this is special. The kernel guarantees
46 to set it to 0 when a thread is launched,
47 so we can use it to detect whether this
48 instance of the emulator needs to be
50 FPREG fpreg
[8]; /* 8 floating point registers */
51 FPSR fpsr
; /* floating point status register */
52 FPCR fpcr
; /* floating point control register */
55 extern void resetFPA11(void);
56 extern void SetRoundingMode(const unsigned int);
57 extern void SetRoundingPrecision(const unsigned int);