aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/ieee754d.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/math-emu/ieee754d.c')
-rw-r--r--arch/mips/math-emu/ieee754d.c39
1 files changed, 7 insertions, 32 deletions
diff --git a/arch/mips/math-emu/ieee754d.c b/arch/mips/math-emu/ieee754d.c
index 9599bdd32585..a04e8a7e5ac3 100644
--- a/arch/mips/math-emu/ieee754d.c
+++ b/arch/mips/math-emu/ieee754d.c
@@ -16,7 +16,7 @@
16 * 16 *
17 * You should have received a copy of the GNU General Public License along 17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc., 18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 19 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 * 20 *
21 * Nov 7, 2000 21 * Nov 7, 2000
22 * Modified to build and operate in Linux kernel environment. 22 * Modified to build and operate in Linux kernel environment.
@@ -25,38 +25,13 @@
25 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. 25 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
26 */ 26 */
27 27
28#include <linux/kernel.h> 28#include <linux/types.h>
29#include <linux/printk.h>
29#include "ieee754.h" 30#include "ieee754.h"
31#include "ieee754sp.h"
32#include "ieee754dp.h"
30 33
31#define DP_EBIAS 1023 34union ieee754dp ieee754dp_dump(char *m, union ieee754dp x)
32#define DP_EMIN (-1022)
33#define DP_EMAX 1023
34#define DP_FBITS 52
35
36#define SP_EBIAS 127
37#define SP_EMIN (-126)
38#define SP_EMAX 127
39#define SP_FBITS 23
40
41#define DP_MBIT(x) ((u64)1 << (x))
42#define DP_HIDDEN_BIT DP_MBIT(DP_FBITS)
43#define DP_SIGN_BIT DP_MBIT(63)
44
45
46#define SP_MBIT(x) ((u32)1 << (x))
47#define SP_HIDDEN_BIT SP_MBIT(SP_FBITS)
48#define SP_SIGN_BIT SP_MBIT(31)
49
50
51#define SPSIGN(sp) (sp.parts.sign)
52#define SPBEXP(sp) (sp.parts.bexp)
53#define SPMANT(sp) (sp.parts.mant)
54
55#define DPSIGN(dp) (dp.parts.sign)
56#define DPBEXP(dp) (dp.parts.bexp)
57#define DPMANT(dp) (dp.parts.mant)
58
59ieee754dp ieee754dp_dump(char *m, ieee754dp x)
60{ 35{
61 int i; 36 int i;
62 37
@@ -96,7 +71,7 @@ ieee754dp ieee754dp_dump(char *m, ieee754dp x)
96 return x; 71 return x;
97} 72}
98 73
99ieee754sp ieee754sp_dump(char *m, ieee754sp x) 74union ieee754sp ieee754sp_dump(char *m, union ieee754sp x)
100{ 75{
101 int i; 76 int i;
102 77