avx5124fmapsintrin.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. /* Copyright (C) 2015-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. #if !defined _IMMINTRIN_H_INCLUDED
  19. # error "Never use <avx5124fmapsintrin.h> directly; include <x86intrin.h> instead."
  20. #endif
  21. #ifndef _AVX5124FMAPSINTRIN_H_INCLUDED
  22. #define _AVX5124FMAPSINTRIN_H_INCLUDED
  23. #ifndef __AVX5124FMAPS__
  24. #pragma GCC push_options
  25. #pragma GCC target("avx5124fmaps")
  26. #define __DISABLE_AVX5124FMAPS__
  27. #endif /* __AVX5124FMAPS__ */
  28. extern __inline __m512
  29. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  30. _mm512_4fmadd_ps (__m512 __A, __m512 __B, __m512 __C,
  31. __m512 __D, __m512 __E, __m128 *__F)
  32. {
  33. return (__m512) __builtin_ia32_4fmaddps ((__v16sf) __B,
  34. (__v16sf) __C,
  35. (__v16sf) __D,
  36. (__v16sf) __E,
  37. (__v16sf) __A,
  38. (const __v4sf *) __F);
  39. }
  40. extern __inline __m512
  41. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  42. _mm512_mask_4fmadd_ps (__m512 __A, __mmask16 __U, __m512 __B,
  43. __m512 __C, __m512 __D, __m512 __E, __m128 *__F)
  44. {
  45. return (__m512) __builtin_ia32_4fmaddps_mask ((__v16sf) __B,
  46. (__v16sf) __C,
  47. (__v16sf) __D,
  48. (__v16sf) __E,
  49. (__v16sf) __A,
  50. (const __v4sf *) __F,
  51. (__v16sf) __A,
  52. (__mmask16) __U);
  53. }
  54. extern __inline __m512
  55. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  56. _mm512_maskz_4fmadd_ps (__mmask16 __U,
  57. __m512 __A, __m512 __B, __m512 __C,
  58. __m512 __D, __m512 __E, __m128 *__F)
  59. {
  60. return (__m512) __builtin_ia32_4fmaddps_mask ((__v16sf) __B,
  61. (__v16sf) __C,
  62. (__v16sf) __D,
  63. (__v16sf) __E,
  64. (__v16sf) __A,
  65. (const __v4sf *) __F,
  66. (__v16sf) _mm512_setzero_ps (),
  67. (__mmask16) __U);
  68. }
  69. extern __inline __m128
  70. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  71. _mm_4fmadd_ss (__m128 __A, __m128 __B, __m128 __C,
  72. __m128 __D, __m128 __E, __m128 *__F)
  73. {
  74. return (__m128) __builtin_ia32_4fmaddss ((__v4sf) __B,
  75. (__v4sf) __C,
  76. (__v4sf) __D,
  77. (__v4sf) __E,
  78. (__v4sf) __A,
  79. (const __v4sf *) __F);
  80. }
  81. extern __inline __m128
  82. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  83. _mm_mask_4fmadd_ss (__m128 __A, __mmask8 __U, __m128 __B, __m128 __C,
  84. __m128 __D, __m128 __E, __m128 *__F)
  85. {
  86. return (__m128) __builtin_ia32_4fmaddss_mask ((__v4sf) __B,
  87. (__v4sf) __C,
  88. (__v4sf) __D,
  89. (__v4sf) __E,
  90. (__v4sf) __A,
  91. (const __v4sf *) __F,
  92. (__v4sf) __A,
  93. (__mmask8) __U);
  94. }
  95. extern __inline __m128
  96. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  97. _mm_maskz_4fmadd_ss (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C,
  98. __m128 __D, __m128 __E, __m128 *__F)
  99. {
  100. return (__m128) __builtin_ia32_4fmaddss_mask ((__v4sf) __B,
  101. (__v4sf) __C,
  102. (__v4sf) __D,
  103. (__v4sf) __E,
  104. (__v4sf) __A,
  105. (const __v4sf *) __F,
  106. (__v4sf) _mm_setzero_ps (),
  107. (__mmask8) __U);
  108. }
  109. extern __inline __m512
  110. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  111. _mm512_4fnmadd_ps (__m512 __A, __m512 __B, __m512 __C,
  112. __m512 __D, __m512 __E, __m128 *__F)
  113. {
  114. return (__m512) __builtin_ia32_4fnmaddps ((__v16sf) __B,
  115. (__v16sf) __C,
  116. (__v16sf) __D,
  117. (__v16sf) __E,
  118. (__v16sf) __A,
  119. (const __v4sf *) __F);
  120. }
  121. extern __inline __m512
  122. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  123. _mm512_mask_4fnmadd_ps (__m512 __A, __mmask16 __U, __m512 __B,
  124. __m512 __C, __m512 __D, __m512 __E, __m128 *__F)
  125. {
  126. return (__m512) __builtin_ia32_4fnmaddps_mask ((__v16sf) __B,
  127. (__v16sf) __C,
  128. (__v16sf) __D,
  129. (__v16sf) __E,
  130. (__v16sf) __A,
  131. (const __v4sf *) __F,
  132. (__v16sf) __A,
  133. (__mmask16) __U);
  134. }
  135. extern __inline __m512
  136. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  137. _mm512_maskz_4fnmadd_ps (__mmask16 __U,
  138. __m512 __A, __m512 __B, __m512 __C,
  139. __m512 __D, __m512 __E, __m128 *__F)
  140. {
  141. return (__m512) __builtin_ia32_4fnmaddps_mask ((__v16sf) __B,
  142. (__v16sf) __C,
  143. (__v16sf) __D,
  144. (__v16sf) __E,
  145. (__v16sf) __A,
  146. (const __v4sf *) __F,
  147. (__v16sf) _mm512_setzero_ps (),
  148. (__mmask16) __U);
  149. }
  150. extern __inline __m128
  151. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  152. _mm_4fnmadd_ss (__m128 __A, __m128 __B, __m128 __C,
  153. __m128 __D, __m128 __E, __m128 *__F)
  154. {
  155. return (__m128) __builtin_ia32_4fnmaddss ((__v4sf) __B,
  156. (__v4sf) __C,
  157. (__v4sf) __D,
  158. (__v4sf) __E,
  159. (__v4sf) __A,
  160. (const __v4sf *) __F);
  161. }
  162. extern __inline __m128
  163. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  164. _mm_mask_4fnmadd_ss (__m128 __A, __mmask8 __U, __m128 __B, __m128 __C,
  165. __m128 __D, __m128 __E, __m128 *__F)
  166. {
  167. return (__m128) __builtin_ia32_4fnmaddss_mask ((__v4sf) __B,
  168. (__v4sf) __C,
  169. (__v4sf) __D,
  170. (__v4sf) __E,
  171. (__v4sf) __A,
  172. (const __v4sf *) __F,
  173. (__v4sf) __A,
  174. (__mmask8) __U);
  175. }
  176. extern __inline __m128
  177. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  178. _mm_maskz_4fnmadd_ss (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C,
  179. __m128 __D, __m128 __E, __m128 *__F)
  180. {
  181. return (__m128) __builtin_ia32_4fnmaddss_mask ((__v4sf) __B,
  182. (__v4sf) __C,
  183. (__v4sf) __D,
  184. (__v4sf) __E,
  185. (__v4sf) __A,
  186. (const __v4sf *) __F,
  187. (__v4sf) _mm_setzero_ps (),
  188. (__mmask8) __U);
  189. }
  190. #ifdef __DISABLE_AVX5124FMAPS__
  191. #undef __DISABLE_AVX5124FMAPS__
  192. #pragma GCC pop_options
  193. #endif /* __DISABLE_AVX5124FMAPS__ */
  194. #endif /* _AVX5124FMAPSINTRIN_H_INCLUDED */