xref: /linux/arch/arm/nwfpe/fpopcode.c (revision 58e16d792a6a8c6b750f637a4649967fcac853dc)
1*74ba9207SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds     NetWinder Floating Point Emulator
41da177e4SLinus Torvalds     (c) Rebel.COM, 1998,1999
51da177e4SLinus Torvalds 
61da177e4SLinus Torvalds     Direct questions, comments to Scott Bambrough <scottb@netwinder.org>
71da177e4SLinus Torvalds 
81da177e4SLinus Torvalds */
91da177e4SLinus Torvalds 
101da177e4SLinus Torvalds #include "fpa11.h"
111da177e4SLinus Torvalds #include "softfloat.h"
121da177e4SLinus Torvalds #include "fpopcode.h"
131da177e4SLinus Torvalds #include "fpsr.h"
141da177e4SLinus Torvalds #include "fpmodule.h"
151da177e4SLinus Torvalds #include "fpmodule.inl"
161da177e4SLinus Torvalds 
171da177e4SLinus Torvalds #ifdef CONFIG_FPE_NWFPE_XP
181da177e4SLinus Torvalds const floatx80 floatx80Constant[] = {
1906c03cacSLennert Buytenhek 	{ .high = 0x0000, .low = 0x0000000000000000ULL},/* extended 0.0 */
2006c03cacSLennert Buytenhek 	{ .high = 0x3fff, .low = 0x8000000000000000ULL},/* extended 1.0 */
2106c03cacSLennert Buytenhek 	{ .high = 0x4000, .low = 0x8000000000000000ULL},/* extended 2.0 */
2206c03cacSLennert Buytenhek 	{ .high = 0x4000, .low = 0xc000000000000000ULL},/* extended 3.0 */
2306c03cacSLennert Buytenhek 	{ .high = 0x4001, .low = 0x8000000000000000ULL},/* extended 4.0 */
2406c03cacSLennert Buytenhek 	{ .high = 0x4001, .low = 0xa000000000000000ULL},/* extended 5.0 */
2506c03cacSLennert Buytenhek 	{ .high = 0x3ffe, .low = 0x8000000000000000ULL},/* extended 0.5 */
2606c03cacSLennert Buytenhek 	{ .high = 0x4002, .low = 0xa000000000000000ULL},/* extended 10.0 */
271da177e4SLinus Torvalds };
281da177e4SLinus Torvalds #endif
291da177e4SLinus Torvalds 
301da177e4SLinus Torvalds const float64 float64Constant[] = {
311da177e4SLinus Torvalds 	0x0000000000000000ULL,	/* double 0.0 */
321da177e4SLinus Torvalds 	0x3ff0000000000000ULL,	/* double 1.0 */
331da177e4SLinus Torvalds 	0x4000000000000000ULL,	/* double 2.0 */
341da177e4SLinus Torvalds 	0x4008000000000000ULL,	/* double 3.0 */
351da177e4SLinus Torvalds 	0x4010000000000000ULL,	/* double 4.0 */
361da177e4SLinus Torvalds 	0x4014000000000000ULL,	/* double 5.0 */
371da177e4SLinus Torvalds 	0x3fe0000000000000ULL,	/* double 0.5 */
381da177e4SLinus Torvalds 	0x4024000000000000ULL	/* double 10.0 */
391da177e4SLinus Torvalds };
401da177e4SLinus Torvalds 
411da177e4SLinus Torvalds const float32 float32Constant[] = {
421da177e4SLinus Torvalds 	0x00000000,		/* single 0.0 */
431da177e4SLinus Torvalds 	0x3f800000,		/* single 1.0 */
441da177e4SLinus Torvalds 	0x40000000,		/* single 2.0 */
451da177e4SLinus Torvalds 	0x40400000,		/* single 3.0 */
461da177e4SLinus Torvalds 	0x40800000,		/* single 4.0 */
471da177e4SLinus Torvalds 	0x40a00000,		/* single 5.0 */
481da177e4SLinus Torvalds 	0x3f000000,		/* single 0.5 */
491da177e4SLinus Torvalds 	0x41200000		/* single 10.0 */
501da177e4SLinus Torvalds };
511da177e4SLinus Torvalds 
52