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