xref: /linux/arch/arm/nwfpe/fpopcode.c (revision 87c9c16317882dd6dbbc07e349bc3223e14f3244)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3     NetWinder Floating Point Emulator
4     (c) Rebel.COM, 1998,1999
5 
6     Direct questions, comments to Scott Bambrough <scottb@netwinder.org>
7 
8 */
9 
10 #include "fpa11.h"
11 #include "softfloat.h"
12 #include "fpopcode.h"
13 #include "fpsr.h"
14 #include "fpmodule.h"
15 #include "fpmodule.inl"
16 
17 #ifdef CONFIG_FPE_NWFPE_XP
18 const floatx80 floatx80Constant[] = {
19 	{ .high = 0x0000, .low = 0x0000000000000000ULL},/* extended 0.0 */
20 	{ .high = 0x3fff, .low = 0x8000000000000000ULL},/* extended 1.0 */
21 	{ .high = 0x4000, .low = 0x8000000000000000ULL},/* extended 2.0 */
22 	{ .high = 0x4000, .low = 0xc000000000000000ULL},/* extended 3.0 */
23 	{ .high = 0x4001, .low = 0x8000000000000000ULL},/* extended 4.0 */
24 	{ .high = 0x4001, .low = 0xa000000000000000ULL},/* extended 5.0 */
25 	{ .high = 0x3ffe, .low = 0x8000000000000000ULL},/* extended 0.5 */
26 	{ .high = 0x4002, .low = 0xa000000000000000ULL},/* extended 10.0 */
27 };
28 #endif
29 
30 const float64 float64Constant[] = {
31 	0x0000000000000000ULL,	/* double 0.0 */
32 	0x3ff0000000000000ULL,	/* double 1.0 */
33 	0x4000000000000000ULL,	/* double 2.0 */
34 	0x4008000000000000ULL,	/* double 3.0 */
35 	0x4010000000000000ULL,	/* double 4.0 */
36 	0x4014000000000000ULL,	/* double 5.0 */
37 	0x3fe0000000000000ULL,	/* double 0.5 */
38 	0x4024000000000000ULL	/* double 10.0 */
39 };
40 
41 const float32 float32Constant[] = {
42 	0x00000000,		/* single 0.0 */
43 	0x3f800000,		/* single 1.0 */
44 	0x40000000,		/* single 2.0 */
45 	0x40400000,		/* single 3.0 */
46 	0x40800000,		/* single 4.0 */
47 	0x40a00000,		/* single 5.0 */
48 	0x3f000000,		/* single 0.5 */
49 	0x41200000		/* single 10.0 */
50 };
51 
52