* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / arch / arm / nwfpe / fpa11.h
blobf7040dbb6a26f4dbaa315045bf43ef8703208175
1 /*
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.
22 #ifndef __FPA11_H__
23 #define __FPA11_H__
25 /* includes */
26 #include "fpsr.h" /* FP control and status register definitions */
27 #include "softfloat.h"
29 #define typeNone 0x00
30 #define typeSingle 0x01
31 #define typeDouble 0x02
32 #define typeExtended 0x03
34 typedef struct tagFPREG {
35 unsigned int fType;
36 union {
37 float32 fSingle;
38 float64 fDouble;
39 floatx80 fExtended;
40 } fValue;
41 } FPREG;
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
49 initialised. */
50 FPREG fpreg[8]; /* 8 floating point registers */
51 FPSR fpsr; /* floating point status register */
52 FPCR fpcr; /* floating point control register */
53 } FPA11;
55 extern void resetFPA11(void);
56 extern void SetRoundingMode(const unsigned int);
57 extern void SetRoundingPrecision(const unsigned int);
59 extern FPA11 *fpa11;
61 #endif