fp-hack.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Copyright (C) 2007-2022 Free Software Foundation, Inc.
  2. Contributor: Joern Rennecke <joern.rennecke@embecosm.com>
  3. on behalf of Synopsys Inc.
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it under
  6. the terms of the GNU General Public License as published by the Free
  7. Software Foundation; either version 3, or (at your option) any later
  8. version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. for more details.
  13. Under Section 7 of GPL version 3, you are granted additional
  14. permissions described in the GCC Runtime Library Exception, version
  15. 3.1, as published by the Free Software Foundation.
  16. You should have received a copy of the GNU General Public License and
  17. a copy of the GCC Runtime Library Exception along with this program;
  18. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. <http://www.gnu.org/licenses/>. */
  20. /* This file selects the single-precision parts of fp-bit.c that are
  21. still needed for some ARC hardware variants; it also renames functions
  22. that duplicate asm-coded functionality so that their results can be
  23. used to compare with the optimized versions for debugging. */
  24. #define ARC_FP_DEBUG 1
  25. #define FINE_GRAINED_LIBRARIES
  26. #if defined (__ARC700__) || defined (__ARC_FPX_QUARK__)
  27. #define ARC_OPTFPE 1
  28. #endif
  29. #if !ARC_OPTFPE || ARC_FP_DEBUG
  30. #define L_pack_sf
  31. #define L_unpack_sf
  32. #define L_make_sf
  33. #define L_thenan_sf
  34. #endif
  35. #if !ARC_OPTFPE
  36. #define L_addsub_sf
  37. #define L_mul_sf
  38. #define L_div_sf
  39. #define L_sf_to_df
  40. #define L_si_to_sf
  41. #define L_sf_to_si
  42. #define L_usi_to_sf
  43. #elif ARC_FP_DEBUG
  44. #define L_addsub_sf
  45. #define __addsf3 __addsf3_c
  46. #define __subsf3 __subsf3_c
  47. #define L_mul_sf
  48. #define __mulsf3 __mulsf3_c
  49. #define L_div_sf
  50. #define __divsf3 __divsf3_c
  51. #define L_sf_to_df
  52. #define __extendsfdf2 __extendsfdf2_c
  53. #define L_si_to_sf
  54. #define __floatsisf __floatsisf_c
  55. #define L_sf_to_si
  56. #define __fixsfsi __fixsfsi_c
  57. #define L_usi_to_sf
  58. #define __floatunsisf __floatunsisf_c
  59. #endif
  60. #if !ARC_OPTFPE
  61. #define L_fpcmp_parts_sf
  62. #define L_compare_sf
  63. #define L_eq_sf
  64. #define L_ne_sf
  65. #define L_gt_sf
  66. #define L_ge_sf
  67. #define L_lt_sf
  68. #define L_le_sf
  69. #define L_unord_sf
  70. #define L_negate_sf
  71. #elif ARC_FP_DEBUG
  72. #define L_fpcmp_parts_sf
  73. #define L_eq_sf
  74. #define __eqsf2 __eqsf2_c
  75. #define L_gt_sf
  76. #define __gtsf2 __gtsf2_c
  77. #define L_ge_sf
  78. #define __gesf2 __gesf2_c
  79. #define L_unord_sf
  80. #define __unordsf2 __unordsf2_c
  81. #endif