Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003     NetWinder Floating Point Emulator
0004     (c) Rebel.COM, 1998,1999
0005 
0006     Direct questions, comments to Scott Bambrough <scottb@netwinder.org>
0007 
0008 */
0009 
0010 #include "fpa11.h"
0011 #include "softfloat.h"
0012 #include "fpopcode.h"
0013 #include "fpsr.h"
0014 #include "fpmodule.h"
0015 #include "fpmodule.inl"
0016 
0017 #ifdef CONFIG_FPE_NWFPE_XP
0018 const floatx80 floatx80Constant[] = {
0019     { .high = 0x0000, .low = 0x0000000000000000ULL},/* extended 0.0 */
0020     { .high = 0x3fff, .low = 0x8000000000000000ULL},/* extended 1.0 */
0021     { .high = 0x4000, .low = 0x8000000000000000ULL},/* extended 2.0 */
0022     { .high = 0x4000, .low = 0xc000000000000000ULL},/* extended 3.0 */
0023     { .high = 0x4001, .low = 0x8000000000000000ULL},/* extended 4.0 */
0024     { .high = 0x4001, .low = 0xa000000000000000ULL},/* extended 5.0 */
0025     { .high = 0x3ffe, .low = 0x8000000000000000ULL},/* extended 0.5 */
0026     { .high = 0x4002, .low = 0xa000000000000000ULL},/* extended 10.0 */
0027 };
0028 #endif
0029 
0030 const float64 float64Constant[] = {
0031     0x0000000000000000ULL,  /* double 0.0 */
0032     0x3ff0000000000000ULL,  /* double 1.0 */
0033     0x4000000000000000ULL,  /* double 2.0 */
0034     0x4008000000000000ULL,  /* double 3.0 */
0035     0x4010000000000000ULL,  /* double 4.0 */
0036     0x4014000000000000ULL,  /* double 5.0 */
0037     0x3fe0000000000000ULL,  /* double 0.5 */
0038     0x4024000000000000ULL   /* double 10.0 */
0039 };
0040 
0041 const float32 float32Constant[] = {
0042     0x00000000,     /* single 0.0 */
0043     0x3f800000,     /* single 1.0 */
0044     0x40000000,     /* single 2.0 */
0045     0x40400000,     /* single 3.0 */
0046     0x40800000,     /* single 4.0 */
0047     0x40a00000,     /* single 5.0 */
0048     0x3f000000,     /* single 0.5 */
0049     0x41200000      /* single 10.0 */
0050 };
0051