sparc-fpu-workaround.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. diff -Nur glibc-2.18.orig/sysdeps/sparc/sparc32/fpu/s_fdimf.S glibc-2.18/sysdeps/sparc/sparc32/fpu/s_fdimf.S
  2. --- glibc-2.18.orig/sysdeps/sparc/sparc32/fpu/s_fdimf.S 2013-08-11 00:52:55.000000000 +0200
  3. +++ glibc-2.18/sysdeps/sparc/sparc32/fpu/s_fdimf.S 1970-01-01 01:00:00.000000000 +0100
  4. @@ -1,35 +0,0 @@
  5. -/* Compute positive difference, sparc 32-bit.
  6. - Copyright (C) 2013 Free Software Foundation, Inc.
  7. - This file is part of the GNU C Library.
  8. - Contributed by David S. Miller <davem@davemloft.net>.
  9. -
  10. - The GNU C Library is free software; you can redistribute it and/or
  11. - modify it under the terms of the GNU Lesser General Public
  12. - License as published by the Free Software Foundation; either
  13. - version 2.1 of the License, or (at your option) any later version.
  14. -
  15. - The GNU C Library is distributed in the hope that it will be useful,
  16. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. - Lesser General Public License for more details.
  19. -
  20. - You should have received a copy of the GNU Lesser General Public
  21. - License along with the GNU C Library; if not, see
  22. - <http://www.gnu.org/licenses/>. */
  23. -
  24. -#include <sysdep.h>
  25. -
  26. -ENTRY(__fdimf)
  27. - st %o0, [%sp + 72]
  28. - st %o1, [%sp + 76]
  29. - ld [%sp + 72], %f0
  30. - ld [%sp + 76], %f1
  31. - fcmps %f0, %f1
  32. - fbug 1f
  33. - st %g0, [%sp + 72]
  34. - ld [%sp + 72], %f0
  35. - fnegs %f0, %f1
  36. -1: retl
  37. - fsubs %f0, %f1, %f0
  38. -END(__fdimf)
  39. -weak_alias (__fdimf, fdimf)
  40. diff -Nur glibc-2.18.orig/sysdeps/sparc/sparc32/fpu/s_fdim.S glibc-2.18/sysdeps/sparc/sparc32/fpu/s_fdim.S
  41. --- glibc-2.18.orig/sysdeps/sparc/sparc32/fpu/s_fdim.S 2013-08-11 00:52:55.000000000 +0200
  42. +++ glibc-2.18/sysdeps/sparc/sparc32/fpu/s_fdim.S 1970-01-01 01:00:00.000000000 +0100
  43. @@ -1,41 +0,0 @@
  44. -/* Compute positive difference, sparc 32-bit.
  45. - Copyright (C) 2013 Free Software Foundation, Inc.
  46. - This file is part of the GNU C Library.
  47. - Contributed by David S. Miller <davem@davemloft.net>.
  48. -
  49. - The GNU C Library is free software; you can redistribute it and/or
  50. - modify it under the terms of the GNU Lesser General Public
  51. - License as published by the Free Software Foundation; either
  52. - version 2.1 of the License, or (at your option) any later version.
  53. -
  54. - The GNU C Library is distributed in the hope that it will be useful,
  55. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  56. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  57. - Lesser General Public License for more details.
  58. -
  59. - You should have received a copy of the GNU Lesser General Public
  60. - License along with the GNU C Library; if not, see
  61. - <http://www.gnu.org/licenses/>. */
  62. -
  63. -#include <sysdep.h>
  64. -#include <math_ldbl_opt.h>
  65. -
  66. -ENTRY(__fdim)
  67. - std %o0, [%sp + 72]
  68. - std %o2, [%sp + 80]
  69. - ldd [%sp + 72], %f0
  70. - ldd [%sp + 80], %f2
  71. - fcmpd %f0, %f2
  72. - st %g0, [%sp + 72]
  73. - fbug 1f
  74. - st %g0, [%sp + 76]
  75. - ldd [%sp + 72], %f0
  76. - fnegd %f0, %f2
  77. -1: retl
  78. - fsubd %f0, %f2, %f0
  79. -END(__fdim)
  80. -weak_alias (__fdim, fdim)
  81. -
  82. -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
  83. -compat_symbol (libm, __fdim, fdiml, GLIBC_2_1);
  84. -#endif