stdfix.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /* Copyright (C) 2007-2019 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3, or (at your option)
  6. any later version.
  7. GCC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. Under Section 7 of GPL version 3, you are granted additional
  12. permissions described in the GCC Runtime Library Exception, version
  13. 3.1, as published by the Free Software Foundation.
  14. You should have received a copy of the GNU General Public License and
  15. a copy of the GCC Runtime Library Exception along with this program;
  16. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  17. <http://www.gnu.org/licenses/>. */
  18. /* ISO/IEC JTC1 SC22 WG14 N1169
  19. * Date: 2006-04-04
  20. * ISO/IEC TR 18037
  21. * Programming languages - C - Extensions to support embedded processors
  22. */
  23. #ifndef _STDFIX_H
  24. #define _STDFIX_H
  25. /* 7.18a.1 Introduction. */
  26. #undef fract
  27. #undef accum
  28. #undef sat
  29. #define fract _Fract
  30. #define accum _Accum
  31. #define sat _Sat
  32. /* 7.18a.3 Precision macros. */
  33. #undef SFRACT_FBIT
  34. #undef SFRACT_MIN
  35. #undef SFRACT_MAX
  36. #undef SFRACT_EPSILON
  37. #define SFRACT_FBIT __SFRACT_FBIT__
  38. #define SFRACT_MIN __SFRACT_MIN__
  39. #define SFRACT_MAX __SFRACT_MAX__
  40. #define SFRACT_EPSILON __SFRACT_EPSILON__
  41. #undef USFRACT_FBIT
  42. #undef USFRACT_MIN
  43. #undef USFRACT_MAX
  44. #undef USFRACT_EPSILON
  45. #define USFRACT_FBIT __USFRACT_FBIT__
  46. #define USFRACT_MIN __USFRACT_MIN__ /* GCC extension. */
  47. #define USFRACT_MAX __USFRACT_MAX__
  48. #define USFRACT_EPSILON __USFRACT_EPSILON__
  49. #undef FRACT_FBIT
  50. #undef FRACT_MIN
  51. #undef FRACT_MAX
  52. #undef FRACT_EPSILON
  53. #define FRACT_FBIT __FRACT_FBIT__
  54. #define FRACT_MIN __FRACT_MIN__
  55. #define FRACT_MAX __FRACT_MAX__
  56. #define FRACT_EPSILON __FRACT_EPSILON__
  57. #undef UFRACT_FBIT
  58. #undef UFRACT_MIN
  59. #undef UFRACT_MAX
  60. #undef UFRACT_EPSILON
  61. #define UFRACT_FBIT __UFRACT_FBIT__
  62. #define UFRACT_MIN __UFRACT_MIN__ /* GCC extension. */
  63. #define UFRACT_MAX __UFRACT_MAX__
  64. #define UFRACT_EPSILON __UFRACT_EPSILON__
  65. #undef LFRACT_FBIT
  66. #undef LFRACT_MIN
  67. #undef LFRACT_MAX
  68. #undef LFRACT_EPSILON
  69. #define LFRACT_FBIT __LFRACT_FBIT__
  70. #define LFRACT_MIN __LFRACT_MIN__
  71. #define LFRACT_MAX __LFRACT_MAX__
  72. #define LFRACT_EPSILON __LFRACT_EPSILON__
  73. #undef ULFRACT_FBIT
  74. #undef ULFRACT_MIN
  75. #undef ULFRACT_MAX
  76. #undef ULFRACT_EPSILON
  77. #define ULFRACT_FBIT __ULFRACT_FBIT__
  78. #define ULFRACT_MIN __ULFRACT_MIN__ /* GCC extension. */
  79. #define ULFRACT_MAX __ULFRACT_MAX__
  80. #define ULFRACT_EPSILON __ULFRACT_EPSILON__
  81. #undef LLFRACT_FBIT
  82. #undef LLFRACT_MIN
  83. #undef LLFRACT_MAX
  84. #undef LLFRACT_EPSILON
  85. #define LLFRACT_FBIT __LLFRACT_FBIT__ /* GCC extension. */
  86. #define LLFRACT_MIN __LLFRACT_MIN__ /* GCC extension. */
  87. #define LLFRACT_MAX __LLFRACT_MAX__ /* GCC extension. */
  88. #define LLFRACT_EPSILON __LLFRACT_EPSILON__ /* GCC extension. */
  89. #undef ULLFRACT_FBIT
  90. #undef ULLFRACT_MIN
  91. #undef ULLFRACT_MAX
  92. #undef ULLFRACT_EPSILON
  93. #define ULLFRACT_FBIT __ULLFRACT_FBIT__ /* GCC extension. */
  94. #define ULLFRACT_MIN __ULLFRACT_MIN__ /* GCC extension. */
  95. #define ULLFRACT_MAX __ULLFRACT_MAX__ /* GCC extension. */
  96. #define ULLFRACT_EPSILON __ULLFRACT_EPSILON__ /* GCC extension. */
  97. #undef SACCUM_FBIT
  98. #undef SACCUM_IBIT
  99. #undef SACCUM_MIN
  100. #undef SACCUM_MAX
  101. #undef SACCUM_EPSILON
  102. #define SACCUM_FBIT __SACCUM_FBIT__
  103. #define SACCUM_IBIT __SACCUM_IBIT__
  104. #define SACCUM_MIN __SACCUM_MIN__
  105. #define SACCUM_MAX __SACCUM_MAX__
  106. #define SACCUM_EPSILON __SACCUM_EPSILON__
  107. #undef USACCUM_FBIT
  108. #undef USACCUM_IBIT
  109. #undef USACCUM_MIN
  110. #undef USACCUM_MAX
  111. #undef USACCUM_EPSILON
  112. #define USACCUM_FBIT __USACCUM_FBIT__
  113. #define USACCUM_IBIT __USACCUM_IBIT__
  114. #define USACCUM_MIN __USACCUM_MIN__ /* GCC extension. */
  115. #define USACCUM_MAX __USACCUM_MAX__
  116. #define USACCUM_EPSILON __USACCUM_EPSILON__
  117. #undef ACCUM_FBIT
  118. #undef ACCUM_IBIT
  119. #undef ACCUM_MIN
  120. #undef ACCUM_MAX
  121. #undef ACCUM_EPSILON
  122. #define ACCUM_FBIT __ACCUM_FBIT__
  123. #define ACCUM_IBIT __ACCUM_IBIT__
  124. #define ACCUM_MIN __ACCUM_MIN__
  125. #define ACCUM_MAX __ACCUM_MAX__
  126. #define ACCUM_EPSILON __ACCUM_EPSILON__
  127. #undef UACCUM_FBIT
  128. #undef UACCUM_IBIT
  129. #undef UACCUM_MIN
  130. #undef UACCUM_MAX
  131. #undef UACCUM_EPSILON
  132. #define UACCUM_FBIT __UACCUM_FBIT__
  133. #define UACCUM_IBIT __UACCUM_IBIT__
  134. #define UACCUM_MIN __UACCUM_MIN__ /* GCC extension. */
  135. #define UACCUM_MAX __UACCUM_MAX__
  136. #define UACCUM_EPSILON __UACCUM_EPSILON__
  137. #undef LACCUM_FBIT
  138. #undef LACCUM_IBIT
  139. #undef LACCUM_MIN
  140. #undef LACCUM_MAX
  141. #undef LACCUM_EPSILON
  142. #define LACCUM_FBIT __LACCUM_FBIT__
  143. #define LACCUM_IBIT __LACCUM_IBIT__
  144. #define LACCUM_MIN __LACCUM_MIN__
  145. #define LACCUM_MAX __LACCUM_MAX__
  146. #define LACCUM_EPSILON __LACCUM_EPSILON__
  147. #undef ULACCUM_FBIT
  148. #undef ULACCUM_IBIT
  149. #undef ULACCUM_MIN
  150. #undef ULACCUM_MAX
  151. #undef ULACCUM_EPSILON
  152. #define ULACCUM_FBIT __ULACCUM_FBIT__
  153. #define ULACCUM_IBIT __ULACCUM_IBIT__
  154. #define ULACCUM_MIN __ULACCUM_MIN__ /* GCC extension. */
  155. #define ULACCUM_MAX __ULACCUM_MAX__
  156. #define ULACCUM_EPSILON __ULACCUM_EPSILON__
  157. #undef LLACCUM_FBIT
  158. #undef LLACCUM_IBIT
  159. #undef LLACCUM_MIN
  160. #undef LLACCUM_MAX
  161. #undef LLACCUM_EPSILON
  162. #define LLACCUM_FBIT __LLACCUM_FBIT__ /* GCC extension. */
  163. #define LLACCUM_IBIT __LLACCUM_IBIT__ /* GCC extension. */
  164. #define LLACCUM_MIN __LLACCUM_MIN__ /* GCC extension. */
  165. #define LLACCUM_MAX __LLACCUM_MAX__ /* GCC extension. */
  166. #define LLACCUM_EPSILON __LLACCUM_EPSILON__ /* GCC extension. */
  167. #undef ULLACCUM_FBIT
  168. #undef ULLACCUM_IBIT
  169. #undef ULLACCUM_MIN
  170. #undef ULLACCUM_MAX
  171. #undef ULLACCUM_EPSILON
  172. #define ULLACCUM_FBIT __ULLACCUM_FBIT__ /* GCC extension. */
  173. #define ULLACCUM_IBIT __ULLACCUM_IBIT__ /* GCC extension. */
  174. #define ULLACCUM_MIN __ULLACCUM_MIN__ /* GCC extension. */
  175. #define ULLACCUM_MAX __ULLACCUM_MAX__ /* GCC extension. */
  176. #define ULLACCUM_EPSILON __ULLACCUM_EPSILON__ /* GCC extension. */
  177. #endif /* _STDFIX_H */