mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
4.3 KiB

  1. Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
  2. and makes printf("%f", 1.0) work.
  3. diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  4. --- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
  5. +++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
  6. @@ -9,4 +9,9 @@
  7. #else
  8. #define __BYTE_ORDER __LITTLE_ENDIAN
  9. #endif
  10. +
  11. +#ifdef __VFP_FP__
  12. +#define __FLOAT_WORD_ORDER __BYTE_ORDER
  13. +#else
  14. #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  15. +#endif
  16. diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  17. --- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
  18. +++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
  19. @@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  20. #define BITS_PER_SHORTINT 16
  21. #define BITS_PER_CHAR 8
  22. -#define IEEE_DOUBLE_BIG_ENDIAN 0
  23. -#define IEEE_DOUBLE_MIXED_ENDIAN 1
  24. +#if defined(__ARMEB__)
  25. +# define IEEE_DOUBLE_MIXED_ENDIAN 0
  26. +# define IEEE_DOUBLE_BIG_ENDIAN 1
  27. +#elif defined(__VFP_FP__)
  28. +# define IEEE_DOUBLE_MIXED_ENDIAN 0
  29. +# define IEEE_DOUBLE_BIG_ENDIAN 0
  30. +#else
  31. +# define IEEE_DOUBLE_BIG_ENDIAN 0
  32. +# define IEEE_DOUBLE_MIXED_ENDIAN 1
  33. +#endif
  34. diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  35. --- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
  36. +++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
  37. @@ -1,115 +0,0 @@
  38. -/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  39. - This file is part of the GNU C Library.
  40. -
  41. - The GNU C Library is free software; you can redistribute it and/or
  42. - modify it under the terms of the GNU Lesser General Public
  43. - License as published by the Free Software Foundation; either
  44. - version 2.1 of the License, or (at your option) any later version.
  45. -
  46. - The GNU C Library is distributed in the hope that it will be useful,
  47. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  48. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  49. - Lesser General Public License for more details.
  50. -
  51. - You should have received a copy of the GNU Lesser General Public
  52. - License along with the GNU C Library; if not, write to the Free
  53. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54. - 02111-1307 USA. */
  55. -
  56. -#ifndef _IEEE754_H
  57. -
  58. -#define _IEEE754_H 1
  59. -#include <features.h>
  60. -
  61. -#include <endian.h>
  62. -
  63. -__BEGIN_DECLS
  64. -
  65. -union ieee754_float
  66. - {
  67. - float f;
  68. -
  69. - /* This is the IEEE 754 single-precision format. */
  70. - struct
  71. - {
  72. - unsigned int mantissa:23;
  73. - unsigned int exponent:8;
  74. - unsigned int negative:1;
  75. - } ieee;
  76. -
  77. - /* This format makes it easier to see if a NaN is a signalling NaN. */
  78. - struct
  79. - {
  80. - unsigned int mantissa:22;
  81. - unsigned int quiet_nan:1;
  82. - unsigned int exponent:8;
  83. - unsigned int negative:1;
  84. - } ieee_nan;
  85. - };
  86. -
  87. -#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
  88. -
  89. -
  90. -union ieee754_double
  91. - {
  92. - double d;
  93. -
  94. - /* This is the IEEE 754 double-precision format. */
  95. - struct
  96. - {
  97. - unsigned int mantissa0:20;
  98. - unsigned int exponent:11;
  99. - unsigned int negative:1;
  100. - unsigned int mantissa1:32;
  101. - } ieee;
  102. -
  103. - /* This format makes it easier to see if a NaN is a signalling NaN. */
  104. - struct
  105. - {
  106. - unsigned int mantissa0:19;
  107. - unsigned int quiet_nan:1;
  108. - unsigned int exponent:11;
  109. - unsigned int negative:1;
  110. - unsigned int mantissa1:32;
  111. - } ieee_nan;
  112. - };
  113. -
  114. -#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
  115. -
  116. -
  117. -/* The following two structures are correct for `new' floating point systems but
  118. - wrong for the old FPPC. The only solution seems to be to avoid their use on
  119. - old hardware. */
  120. -
  121. -union ieee854_long_double
  122. - {
  123. - long double d;
  124. -
  125. - /* This is the IEEE 854 double-extended-precision format. */
  126. - struct
  127. - {
  128. - unsigned int exponent:15;
  129. - unsigned int empty:16;
  130. - unsigned int negative:1;
  131. - unsigned int mantissa1:32;
  132. - unsigned int mantissa0:32;
  133. - } ieee;
  134. -
  135. - /* This is for NaNs in the IEEE 854 double-extended-precision format. */
  136. - struct
  137. - {
  138. - unsigned int exponent:15;
  139. - unsigned int empty:16;
  140. - unsigned int negative:1;
  141. - unsigned int mantissa1:32;
  142. - unsigned int mantissa0:30;
  143. - unsigned int quiet_nan:1;
  144. - unsigned int one:1;
  145. - } ieee_nan;
  146. - };
  147. -
  148. -#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
  149. -
  150. -__END_DECLS
  151. -
  152. -#endif /* ieee754.h */