fpopcode.c 1.6 KB

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