2
1

i386-gcc-soft-float.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. diff -urN gcc-3.3.2-orig/gcc/config/i386/i386.h gcc-3.3.2/gcc/config/i386/i386.h
  2. --- gcc-3.3.2-orig/gcc/config/i386/i386.h 2003-06-25 16:18:31.000000000 -0500
  3. +++ gcc-3.3.2/gcc/config/i386/i386.h 2003-10-22 01:46:57.000000000 -0500
  4. @@ -653,6 +653,7 @@
  5. /* Define for XFmode or TFmode extended real floating point support.
  6. The XFmode is specified by i386 ABI, while TFmode may be faster
  7. due to alignment and simplifications in the address calculations. */
  8. +#if 0
  9. #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)
  10. #define MAX_LONG_DOUBLE_TYPE_SIZE 128
  11. #ifdef __x86_64__
  12. @@ -660,6 +661,17 @@
  13. #else
  14. #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
  15. #endif
  16. +#else
  17. + /* Set up for x86 soft float with 64-bit long doubles, since that's
  18. + * all the soft float emulation supports. */
  19. +#define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : (TARGET_80387 ? 96 : 64))
  20. +#define MAX_LONG_DOUBLE_TYPE_SIZE 128
  21. +#ifdef __x86_64__
  22. +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
  23. +#else
  24. +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 96 : 64)
  25. +#endif
  26. +#endif
  27. /* Set the value of FLT_EVAL_METHOD in float.h. When using only the
  28. FPU, assume that the fpcw is set to extended precision; when using
  29. diff -urN gcc-3.3.2-orig/gcc/config/t-linux gcc-3.3.2/gcc/config/t-linux
  30. --- gcc-3.3.2-orig/gcc/config/t-linux-uclibc 2003-06-04 11:56:11.000000000 -0500
  31. +++ gcc-3.3.2/gcc/config/t-linux-uclibc 2003-10-22 01:46:39.000000000 -0500
  32. @@ -21,3 +21,28 @@
  33. LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
  34. $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
  35. LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
  36. +
  37. +##############################################
  38. +# We want fine grained libraries, so use the new code to build the
  39. +# floating point emulation libraries.
  40. +FPBIT = fp-bit.c
  41. +DPBIT = dp-bit.c
  42. +
  43. +#LIB2FUNCS_EXTRA = xp-bit.c
  44. +
  45. +dp-bit.c: $(srcdir)/config/fp-bit.c
  46. + echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
  47. + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
  48. + echo '#endif' >> dp-bit.c
  49. + cat $(srcdir)/config/fp-bit.c >> dp-bit.c
  50. +
  51. +fp-bit.c: $(srcdir)/config/fp-bit.c
  52. + echo '#define FLOAT' > fp-bit.c
  53. + echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
  54. + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
  55. + echo '#endif' >> fp-bit.c
  56. + cat $(srcdir)/config/fp-bit.c >> fp-bit.c
  57. +
  58. +#MULTILIB_OPTIONS = msoft-float
  59. +#MULTILIB_DIRNAMES = soft-float
  60. +