Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

1772 lines
70KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>x86 Built-in Functions (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="x86 Built-in Functions (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="x86 Built-in Functions (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Target-Builtins.html#Target-Builtins" rel="up" title="Target Builtins">
  30. <link href="x86-transactional-memory-intrinsics.html#x86-transactional-memory-intrinsics" rel="next" title="x86 transactional memory intrinsics">
  31. <link href="TILEPro-Built_002din-Functions.html#TILEPro-Built_002din-Functions" rel="prev" title="TILEPro Built-in Functions">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="x86-Built_002din-Functions"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="x86-transactional-memory-intrinsics.html#x86-transactional-memory-intrinsics" accesskey="n" rel="next">x86 transactional memory intrinsics</a>, Previous: <a href="TILEPro-Built_002din-Functions.html#TILEPro-Built_002din-Functions" accesskey="p" rel="prev">TILEPro Built-in Functions</a>, Up: <a href="Target-Builtins.html#Target-Builtins" accesskey="u" rel="up">Target Builtins</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="x86-Built_002din-Functions-1"></a>
  68. <h4 class="subsection">6.60.34 x86 Built-in Functions</h4>
  69. <p>These built-in functions are available for the x86-32 and x86-64 family
  70. of computers, depending on the command-line switches used.
  71. </p>
  72. <p>If you specify command-line switches such as <samp>-msse</samp>,
  73. the compiler could use the extended instruction sets even if the built-ins
  74. are not used explicitly in the program. For this reason, applications
  75. that perform run-time CPU detection must compile separate files for each
  76. supported architecture, using the appropriate flags. In particular,
  77. the file containing the CPU detection code should be compiled without
  78. these options.
  79. </p>
  80. <p>The following machine modes are available for use with MMX built-in functions
  81. (see <a href="Vector-Extensions.html#Vector-Extensions">Vector Extensions</a>): <code>V2SI</code> for a vector of two 32-bit integers,
  82. <code>V4HI</code> for a vector of four 16-bit integers, and <code>V8QI</code> for a
  83. vector of eight 8-bit integers. Some of the built-in functions operate on
  84. MMX registers as a whole 64-bit entity, these use <code>V1DI</code> as their mode.
  85. </p>
  86. <p>If 3DNow! extensions are enabled, <code>V2SF</code> is used as a mode for a vector
  87. of two 32-bit floating-point values.
  88. </p>
  89. <p>If SSE extensions are enabled, <code>V4SF</code> is used for a vector of four 32-bit
  90. floating-point values. Some instructions use a vector of four 32-bit
  91. integers, these use <code>V4SI</code>. Finally, some instructions operate on an
  92. entire vector register, interpreting it as a 128-bit integer, these use mode
  93. <code>TI</code>.
  94. </p>
  95. <p>The x86-32 and x86-64 family of processors use additional built-in
  96. functions for efficient use of <code>TF</code> (<code>__float128</code>) 128-bit
  97. floating point and <code>TC</code> 128-bit complex floating-point values.
  98. </p>
  99. <p>The following floating-point built-in functions are always available. All
  100. of them implement the function that is part of the name.
  101. </p>
  102. <div class="smallexample">
  103. <pre class="smallexample">__float128 __builtin_fabsq (__float128)
  104. __float128 __builtin_copysignq (__float128, __float128)
  105. </pre></div>
  106. <p>The following built-in functions are always available.
  107. </p>
  108. <dl compact="compact">
  109. <dt><code>__float128 __builtin_infq (void)</code></dt>
  110. <dd><p>Similar to <code>__builtin_inf</code>, except the return type is <code>__float128</code>.
  111. <a name="index-_005f_005fbuiltin_005finfq"></a>
  112. </p>
  113. </dd>
  114. <dt><code>__float128 __builtin_huge_valq (void)</code></dt>
  115. <dd><p>Similar to <code>__builtin_huge_val</code>, except the return type is <code>__float128</code>.
  116. <a name="index-_005f_005fbuiltin_005fhuge_005fvalq"></a>
  117. </p>
  118. </dd>
  119. <dt><code>__float128 __builtin_nanq (void)</code></dt>
  120. <dd><p>Similar to <code>__builtin_nan</code>, except the return type is <code>__float128</code>.
  121. <a name="index-_005f_005fbuiltin_005fnanq"></a>
  122. </p>
  123. </dd>
  124. <dt><code>__float128 __builtin_nansq (void)</code></dt>
  125. <dd><p>Similar to <code>__builtin_nans</code>, except the return type is <code>__float128</code>.
  126. <a name="index-_005f_005fbuiltin_005fnansq"></a>
  127. </p></dd>
  128. </dl>
  129. <p>The following built-in function is always available.
  130. </p>
  131. <dl compact="compact">
  132. <dt><code>void __builtin_ia32_pause (void)</code></dt>
  133. <dd><p>Generates the <code>pause</code> machine instruction with a compiler memory
  134. barrier.
  135. </p></dd>
  136. </dl>
  137. <p>The following built-in functions are always available and can be used to
  138. check the target platform type.
  139. </p>
  140. <dl>
  141. <dt><a name="index-_005f_005fbuiltin_005fcpu_005finit-1"></a>Built-in Function: <em>void</em> <strong>__builtin_cpu_init</strong> <em>(void)</em></dt>
  142. <dd><p>This function runs the CPU detection code to check the type of CPU and the
  143. features supported. This built-in function needs to be invoked along with the built-in functions
  144. to check CPU type and features, <code>__builtin_cpu_is</code> and
  145. <code>__builtin_cpu_supports</code>, only when used in a function that is
  146. executed before any constructors are called. The CPU detection code is
  147. automatically executed in a very high priority constructor.
  148. </p>
  149. <p>For example, this function has to be used in <code>ifunc</code> resolvers that
  150. check for CPU type using the built-in functions <code>__builtin_cpu_is</code>
  151. and <code>__builtin_cpu_supports</code>, or in constructors on targets that
  152. don&rsquo;t support constructor priority.
  153. </p><div class="smallexample">
  154. <pre class="smallexample">
  155. static void (*resolve_memcpy (void)) (void)
  156. {
  157. // ifunc resolvers fire before constructors, explicitly call the init
  158. // function.
  159. __builtin_cpu_init ();
  160. if (__builtin_cpu_supports (&quot;ssse3&quot;))
  161. return ssse3_memcpy; // super fast memcpy with ssse3 instructions.
  162. else
  163. return default_memcpy;
  164. }
  165. void *memcpy (void *, const void *, size_t)
  166. __attribute__ ((ifunc (&quot;resolve_memcpy&quot;)));
  167. </pre></div>
  168. </dd></dl>
  169. <dl>
  170. <dt><a name="index-_005f_005fbuiltin_005fcpu_005fis-1"></a>Built-in Function: <em>int</em> <strong>__builtin_cpu_is</strong> <em>(const char *<var>cpuname</var>)</em></dt>
  171. <dd><p>This function returns a positive integer if the run-time CPU
  172. is of type <var>cpuname</var>
  173. and returns <code>0</code> otherwise. The following CPU names can be detected:
  174. </p>
  175. <dl compact="compact">
  176. <dt>&lsquo;<samp>amd</samp>&rsquo;</dt>
  177. <dd><p>AMD CPU.
  178. </p>
  179. </dd>
  180. <dt>&lsquo;<samp>intel</samp>&rsquo;</dt>
  181. <dd><p>Intel CPU.
  182. </p>
  183. </dd>
  184. <dt>&lsquo;<samp>atom</samp>&rsquo;</dt>
  185. <dd><p>Intel Atom CPU.
  186. </p>
  187. </dd>
  188. <dt>&lsquo;<samp>slm</samp>&rsquo;</dt>
  189. <dd><p>Intel Silvermont CPU.
  190. </p>
  191. </dd>
  192. <dt>&lsquo;<samp>core2</samp>&rsquo;</dt>
  193. <dd><p>Intel Core 2 CPU.
  194. </p>
  195. </dd>
  196. <dt>&lsquo;<samp>corei7</samp>&rsquo;</dt>
  197. <dd><p>Intel Core i7 CPU.
  198. </p>
  199. </dd>
  200. <dt>&lsquo;<samp>nehalem</samp>&rsquo;</dt>
  201. <dd><p>Intel Core i7 Nehalem CPU.
  202. </p>
  203. </dd>
  204. <dt>&lsquo;<samp>westmere</samp>&rsquo;</dt>
  205. <dd><p>Intel Core i7 Westmere CPU.
  206. </p>
  207. </dd>
  208. <dt>&lsquo;<samp>sandybridge</samp>&rsquo;</dt>
  209. <dd><p>Intel Core i7 Sandy Bridge CPU.
  210. </p>
  211. </dd>
  212. <dt>&lsquo;<samp>ivybridge</samp>&rsquo;</dt>
  213. <dd><p>Intel Core i7 Ivy Bridge CPU.
  214. </p>
  215. </dd>
  216. <dt>&lsquo;<samp>haswell</samp>&rsquo;</dt>
  217. <dd><p>Intel Core i7 Haswell CPU.
  218. </p>
  219. </dd>
  220. <dt>&lsquo;<samp>broadwell</samp>&rsquo;</dt>
  221. <dd><p>Intel Core i7 Broadwell CPU.
  222. </p>
  223. </dd>
  224. <dt>&lsquo;<samp>skylake</samp>&rsquo;</dt>
  225. <dd><p>Intel Core i7 Skylake CPU.
  226. </p>
  227. </dd>
  228. <dt>&lsquo;<samp>skylake-avx512</samp>&rsquo;</dt>
  229. <dd><p>Intel Core i7 Skylake AVX512 CPU.
  230. </p>
  231. </dd>
  232. <dt>&lsquo;<samp>cannonlake</samp>&rsquo;</dt>
  233. <dd><p>Intel Core i7 Cannon Lake CPU.
  234. </p>
  235. </dd>
  236. <dt>&lsquo;<samp>icelake-client</samp>&rsquo;</dt>
  237. <dd><p>Intel Core i7 Ice Lake Client CPU.
  238. </p>
  239. </dd>
  240. <dt>&lsquo;<samp>icelake-server</samp>&rsquo;</dt>
  241. <dd><p>Intel Core i7 Ice Lake Server CPU.
  242. </p>
  243. </dd>
  244. <dt>&lsquo;<samp>cascadelake</samp>&rsquo;</dt>
  245. <dd><p>Intel Core i7 Cascadelake CPU.
  246. </p>
  247. </dd>
  248. <dt>&lsquo;<samp>tigerlake</samp>&rsquo;</dt>
  249. <dd><p>Intel Core i7 Tigerlake CPU.
  250. </p>
  251. </dd>
  252. <dt>&lsquo;<samp>cooperlake</samp>&rsquo;</dt>
  253. <dd><p>Intel Core i7 Cooperlake CPU.
  254. </p>
  255. </dd>
  256. <dt>&lsquo;<samp>bonnell</samp>&rsquo;</dt>
  257. <dd><p>Intel Atom Bonnell CPU.
  258. </p>
  259. </dd>
  260. <dt>&lsquo;<samp>silvermont</samp>&rsquo;</dt>
  261. <dd><p>Intel Atom Silvermont CPU.
  262. </p>
  263. </dd>
  264. <dt>&lsquo;<samp>goldmont</samp>&rsquo;</dt>
  265. <dd><p>Intel Atom Goldmont CPU.
  266. </p>
  267. </dd>
  268. <dt>&lsquo;<samp>goldmont-plus</samp>&rsquo;</dt>
  269. <dd><p>Intel Atom Goldmont Plus CPU.
  270. </p>
  271. </dd>
  272. <dt>&lsquo;<samp>tremont</samp>&rsquo;</dt>
  273. <dd><p>Intel Atom Tremont CPU.
  274. </p>
  275. </dd>
  276. <dt>&lsquo;<samp>knl</samp>&rsquo;</dt>
  277. <dd><p>Intel Knights Landing CPU.
  278. </p>
  279. </dd>
  280. <dt>&lsquo;<samp>knm</samp>&rsquo;</dt>
  281. <dd><p>Intel Knights Mill CPU.
  282. </p>
  283. </dd>
  284. <dt>&lsquo;<samp>amdfam10h</samp>&rsquo;</dt>
  285. <dd><p>AMD Family 10h CPU.
  286. </p>
  287. </dd>
  288. <dt>&lsquo;<samp>barcelona</samp>&rsquo;</dt>
  289. <dd><p>AMD Family 10h Barcelona CPU.
  290. </p>
  291. </dd>
  292. <dt>&lsquo;<samp>shanghai</samp>&rsquo;</dt>
  293. <dd><p>AMD Family 10h Shanghai CPU.
  294. </p>
  295. </dd>
  296. <dt>&lsquo;<samp>istanbul</samp>&rsquo;</dt>
  297. <dd><p>AMD Family 10h Istanbul CPU.
  298. </p>
  299. </dd>
  300. <dt>&lsquo;<samp>btver1</samp>&rsquo;</dt>
  301. <dd><p>AMD Family 14h CPU.
  302. </p>
  303. </dd>
  304. <dt>&lsquo;<samp>amdfam15h</samp>&rsquo;</dt>
  305. <dd><p>AMD Family 15h CPU.
  306. </p>
  307. </dd>
  308. <dt>&lsquo;<samp>bdver1</samp>&rsquo;</dt>
  309. <dd><p>AMD Family 15h Bulldozer version 1.
  310. </p>
  311. </dd>
  312. <dt>&lsquo;<samp>bdver2</samp>&rsquo;</dt>
  313. <dd><p>AMD Family 15h Bulldozer version 2.
  314. </p>
  315. </dd>
  316. <dt>&lsquo;<samp>bdver3</samp>&rsquo;</dt>
  317. <dd><p>AMD Family 15h Bulldozer version 3.
  318. </p>
  319. </dd>
  320. <dt>&lsquo;<samp>bdver4</samp>&rsquo;</dt>
  321. <dd><p>AMD Family 15h Bulldozer version 4.
  322. </p>
  323. </dd>
  324. <dt>&lsquo;<samp>btver2</samp>&rsquo;</dt>
  325. <dd><p>AMD Family 16h CPU.
  326. </p>
  327. </dd>
  328. <dt>&lsquo;<samp>amdfam17h</samp>&rsquo;</dt>
  329. <dd><p>AMD Family 17h CPU.
  330. </p>
  331. </dd>
  332. <dt>&lsquo;<samp>znver1</samp>&rsquo;</dt>
  333. <dd><p>AMD Family 17h Zen version 1.
  334. </p>
  335. </dd>
  336. <dt>&lsquo;<samp>znver2</samp>&rsquo;</dt>
  337. <dd><p>AMD Family 17h Zen version 2.
  338. </p></dd>
  339. </dl>
  340. <p>Here is an example:
  341. </p><div class="smallexample">
  342. <pre class="smallexample">if (__builtin_cpu_is (&quot;corei7&quot;))
  343. {
  344. do_corei7 (); // Core i7 specific implementation.
  345. }
  346. else
  347. {
  348. do_generic (); // Generic implementation.
  349. }
  350. </pre></div>
  351. </dd></dl>
  352. <dl>
  353. <dt><a name="index-_005f_005fbuiltin_005fcpu_005fsupports-1"></a>Built-in Function: <em>int</em> <strong>__builtin_cpu_supports</strong> <em>(const char *<var>feature</var>)</em></dt>
  354. <dd><p>This function returns a positive integer if the run-time CPU
  355. supports <var>feature</var>
  356. and returns <code>0</code> otherwise. The following features can be detected:
  357. </p>
  358. <dl compact="compact">
  359. <dt>&lsquo;<samp>cmov</samp>&rsquo;</dt>
  360. <dd><p>CMOV instruction.
  361. </p></dd>
  362. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  363. <dd><p>MMX instructions.
  364. </p></dd>
  365. <dt>&lsquo;<samp>popcnt</samp>&rsquo;</dt>
  366. <dd><p>POPCNT instruction.
  367. </p></dd>
  368. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  369. <dd><p>SSE instructions.
  370. </p></dd>
  371. <dt>&lsquo;<samp>sse2</samp>&rsquo;</dt>
  372. <dd><p>SSE2 instructions.
  373. </p></dd>
  374. <dt>&lsquo;<samp>sse3</samp>&rsquo;</dt>
  375. <dd><p>SSE3 instructions.
  376. </p></dd>
  377. <dt>&lsquo;<samp>ssse3</samp>&rsquo;</dt>
  378. <dd><p>SSSE3 instructions.
  379. </p></dd>
  380. <dt>&lsquo;<samp>sse4.1</samp>&rsquo;</dt>
  381. <dd><p>SSE4.1 instructions.
  382. </p></dd>
  383. <dt>&lsquo;<samp>sse4.2</samp>&rsquo;</dt>
  384. <dd><p>SSE4.2 instructions.
  385. </p></dd>
  386. <dt>&lsquo;<samp>avx</samp>&rsquo;</dt>
  387. <dd><p>AVX instructions.
  388. </p></dd>
  389. <dt>&lsquo;<samp>avx2</samp>&rsquo;</dt>
  390. <dd><p>AVX2 instructions.
  391. </p></dd>
  392. <dt>&lsquo;<samp>sse4a</samp>&rsquo;</dt>
  393. <dd><p>SSE4A instructions.
  394. </p></dd>
  395. <dt>&lsquo;<samp>fma4</samp>&rsquo;</dt>
  396. <dd><p>FMA4 instructions.
  397. </p></dd>
  398. <dt>&lsquo;<samp>xop</samp>&rsquo;</dt>
  399. <dd><p>XOP instructions.
  400. </p></dd>
  401. <dt>&lsquo;<samp>fma</samp>&rsquo;</dt>
  402. <dd><p>FMA instructions.
  403. </p></dd>
  404. <dt>&lsquo;<samp>avx512f</samp>&rsquo;</dt>
  405. <dd><p>AVX512F instructions.
  406. </p></dd>
  407. <dt>&lsquo;<samp>bmi</samp>&rsquo;</dt>
  408. <dd><p>BMI instructions.
  409. </p></dd>
  410. <dt>&lsquo;<samp>bmi2</samp>&rsquo;</dt>
  411. <dd><p>BMI2 instructions.
  412. </p></dd>
  413. <dt>&lsquo;<samp>aes</samp>&rsquo;</dt>
  414. <dd><p>AES instructions.
  415. </p></dd>
  416. <dt>&lsquo;<samp>pclmul</samp>&rsquo;</dt>
  417. <dd><p>PCLMUL instructions.
  418. </p></dd>
  419. <dt>&lsquo;<samp>avx512vl</samp>&rsquo;</dt>
  420. <dd><p>AVX512VL instructions.
  421. </p></dd>
  422. <dt>&lsquo;<samp>avx512bw</samp>&rsquo;</dt>
  423. <dd><p>AVX512BW instructions.
  424. </p></dd>
  425. <dt>&lsquo;<samp>avx512dq</samp>&rsquo;</dt>
  426. <dd><p>AVX512DQ instructions.
  427. </p></dd>
  428. <dt>&lsquo;<samp>avx512cd</samp>&rsquo;</dt>
  429. <dd><p>AVX512CD instructions.
  430. </p></dd>
  431. <dt>&lsquo;<samp>avx512er</samp>&rsquo;</dt>
  432. <dd><p>AVX512ER instructions.
  433. </p></dd>
  434. <dt>&lsquo;<samp>avx512pf</samp>&rsquo;</dt>
  435. <dd><p>AVX512PF instructions.
  436. </p></dd>
  437. <dt>&lsquo;<samp>avx512vbmi</samp>&rsquo;</dt>
  438. <dd><p>AVX512VBMI instructions.
  439. </p></dd>
  440. <dt>&lsquo;<samp>avx512ifma</samp>&rsquo;</dt>
  441. <dd><p>AVX512IFMA instructions.
  442. </p></dd>
  443. <dt>&lsquo;<samp>avx5124vnniw</samp>&rsquo;</dt>
  444. <dd><p>AVX5124VNNIW instructions.
  445. </p></dd>
  446. <dt>&lsquo;<samp>avx5124fmaps</samp>&rsquo;</dt>
  447. <dd><p>AVX5124FMAPS instructions.
  448. </p></dd>
  449. <dt>&lsquo;<samp>avx512vpopcntdq</samp>&rsquo;</dt>
  450. <dd><p>AVX512VPOPCNTDQ instructions.
  451. </p></dd>
  452. <dt>&lsquo;<samp>avx512vbmi2</samp>&rsquo;</dt>
  453. <dd><p>AVX512VBMI2 instructions.
  454. </p></dd>
  455. <dt>&lsquo;<samp>gfni</samp>&rsquo;</dt>
  456. <dd><p>GFNI instructions.
  457. </p></dd>
  458. <dt>&lsquo;<samp>vpclmulqdq</samp>&rsquo;</dt>
  459. <dd><p>VPCLMULQDQ instructions.
  460. </p></dd>
  461. <dt>&lsquo;<samp>avx512vnni</samp>&rsquo;</dt>
  462. <dd><p>AVX512VNNI instructions.
  463. </p></dd>
  464. <dt>&lsquo;<samp>avx512bitalg</samp>&rsquo;</dt>
  465. <dd><p>AVX512BITALG instructions.
  466. </p></dd>
  467. </dl>
  468. <p>Here is an example:
  469. </p><div class="smallexample">
  470. <pre class="smallexample">if (__builtin_cpu_supports (&quot;popcnt&quot;))
  471. {
  472. asm(&quot;popcnt %1,%0&quot; : &quot;=r&quot;(count) : &quot;rm&quot;(n) : &quot;cc&quot;);
  473. }
  474. else
  475. {
  476. count = generic_countbits (n); //generic implementation.
  477. }
  478. </pre></div>
  479. </dd></dl>
  480. <p>The following built-in functions are made available by <samp>-mmmx</samp>.
  481. All of them generate the machine instruction that is part of the name.
  482. </p>
  483. <div class="smallexample">
  484. <pre class="smallexample">v8qi __builtin_ia32_paddb (v8qi, v8qi)
  485. v4hi __builtin_ia32_paddw (v4hi, v4hi)
  486. v2si __builtin_ia32_paddd (v2si, v2si)
  487. v8qi __builtin_ia32_psubb (v8qi, v8qi)
  488. v4hi __builtin_ia32_psubw (v4hi, v4hi)
  489. v2si __builtin_ia32_psubd (v2si, v2si)
  490. v8qi __builtin_ia32_paddsb (v8qi, v8qi)
  491. v4hi __builtin_ia32_paddsw (v4hi, v4hi)
  492. v8qi __builtin_ia32_psubsb (v8qi, v8qi)
  493. v4hi __builtin_ia32_psubsw (v4hi, v4hi)
  494. v8qi __builtin_ia32_paddusb (v8qi, v8qi)
  495. v4hi __builtin_ia32_paddusw (v4hi, v4hi)
  496. v8qi __builtin_ia32_psubusb (v8qi, v8qi)
  497. v4hi __builtin_ia32_psubusw (v4hi, v4hi)
  498. v4hi __builtin_ia32_pmullw (v4hi, v4hi)
  499. v4hi __builtin_ia32_pmulhw (v4hi, v4hi)
  500. di __builtin_ia32_pand (di, di)
  501. di __builtin_ia32_pandn (di,di)
  502. di __builtin_ia32_por (di, di)
  503. di __builtin_ia32_pxor (di, di)
  504. v8qi __builtin_ia32_pcmpeqb (v8qi, v8qi)
  505. v4hi __builtin_ia32_pcmpeqw (v4hi, v4hi)
  506. v2si __builtin_ia32_pcmpeqd (v2si, v2si)
  507. v8qi __builtin_ia32_pcmpgtb (v8qi, v8qi)
  508. v4hi __builtin_ia32_pcmpgtw (v4hi, v4hi)
  509. v2si __builtin_ia32_pcmpgtd (v2si, v2si)
  510. v8qi __builtin_ia32_punpckhbw (v8qi, v8qi)
  511. v4hi __builtin_ia32_punpckhwd (v4hi, v4hi)
  512. v2si __builtin_ia32_punpckhdq (v2si, v2si)
  513. v8qi __builtin_ia32_punpcklbw (v8qi, v8qi)
  514. v4hi __builtin_ia32_punpcklwd (v4hi, v4hi)
  515. v2si __builtin_ia32_punpckldq (v2si, v2si)
  516. v8qi __builtin_ia32_packsswb (v4hi, v4hi)
  517. v4hi __builtin_ia32_packssdw (v2si, v2si)
  518. v8qi __builtin_ia32_packuswb (v4hi, v4hi)
  519. v4hi __builtin_ia32_psllw (v4hi, v4hi)
  520. v2si __builtin_ia32_pslld (v2si, v2si)
  521. v1di __builtin_ia32_psllq (v1di, v1di)
  522. v4hi __builtin_ia32_psrlw (v4hi, v4hi)
  523. v2si __builtin_ia32_psrld (v2si, v2si)
  524. v1di __builtin_ia32_psrlq (v1di, v1di)
  525. v4hi __builtin_ia32_psraw (v4hi, v4hi)
  526. v2si __builtin_ia32_psrad (v2si, v2si)
  527. v4hi __builtin_ia32_psllwi (v4hi, int)
  528. v2si __builtin_ia32_pslldi (v2si, int)
  529. v1di __builtin_ia32_psllqi (v1di, int)
  530. v4hi __builtin_ia32_psrlwi (v4hi, int)
  531. v2si __builtin_ia32_psrldi (v2si, int)
  532. v1di __builtin_ia32_psrlqi (v1di, int)
  533. v4hi __builtin_ia32_psrawi (v4hi, int)
  534. v2si __builtin_ia32_psradi (v2si, int)
  535. </pre></div>
  536. <p>The following built-in functions are made available either with
  537. <samp>-msse</samp>, or with <samp>-m3dnowa</samp>. All of them generate
  538. the machine instruction that is part of the name.
  539. </p>
  540. <div class="smallexample">
  541. <pre class="smallexample">v4hi __builtin_ia32_pmulhuw (v4hi, v4hi)
  542. v8qi __builtin_ia32_pavgb (v8qi, v8qi)
  543. v4hi __builtin_ia32_pavgw (v4hi, v4hi)
  544. v1di __builtin_ia32_psadbw (v8qi, v8qi)
  545. v8qi __builtin_ia32_pmaxub (v8qi, v8qi)
  546. v4hi __builtin_ia32_pmaxsw (v4hi, v4hi)
  547. v8qi __builtin_ia32_pminub (v8qi, v8qi)
  548. v4hi __builtin_ia32_pminsw (v4hi, v4hi)
  549. int __builtin_ia32_pmovmskb (v8qi)
  550. void __builtin_ia32_maskmovq (v8qi, v8qi, char *)
  551. void __builtin_ia32_movntq (di *, di)
  552. void __builtin_ia32_sfence (void)
  553. </pre></div>
  554. <p>The following built-in functions are available when <samp>-msse</samp> is used.
  555. All of them generate the machine instruction that is part of the name.
  556. </p>
  557. <div class="smallexample">
  558. <pre class="smallexample">int __builtin_ia32_comieq (v4sf, v4sf)
  559. int __builtin_ia32_comineq (v4sf, v4sf)
  560. int __builtin_ia32_comilt (v4sf, v4sf)
  561. int __builtin_ia32_comile (v4sf, v4sf)
  562. int __builtin_ia32_comigt (v4sf, v4sf)
  563. int __builtin_ia32_comige (v4sf, v4sf)
  564. int __builtin_ia32_ucomieq (v4sf, v4sf)
  565. int __builtin_ia32_ucomineq (v4sf, v4sf)
  566. int __builtin_ia32_ucomilt (v4sf, v4sf)
  567. int __builtin_ia32_ucomile (v4sf, v4sf)
  568. int __builtin_ia32_ucomigt (v4sf, v4sf)
  569. int __builtin_ia32_ucomige (v4sf, v4sf)
  570. v4sf __builtin_ia32_addps (v4sf, v4sf)
  571. v4sf __builtin_ia32_subps (v4sf, v4sf)
  572. v4sf __builtin_ia32_mulps (v4sf, v4sf)
  573. v4sf __builtin_ia32_divps (v4sf, v4sf)
  574. v4sf __builtin_ia32_addss (v4sf, v4sf)
  575. v4sf __builtin_ia32_subss (v4sf, v4sf)
  576. v4sf __builtin_ia32_mulss (v4sf, v4sf)
  577. v4sf __builtin_ia32_divss (v4sf, v4sf)
  578. v4sf __builtin_ia32_cmpeqps (v4sf, v4sf)
  579. v4sf __builtin_ia32_cmpltps (v4sf, v4sf)
  580. v4sf __builtin_ia32_cmpleps (v4sf, v4sf)
  581. v4sf __builtin_ia32_cmpgtps (v4sf, v4sf)
  582. v4sf __builtin_ia32_cmpgeps (v4sf, v4sf)
  583. v4sf __builtin_ia32_cmpunordps (v4sf, v4sf)
  584. v4sf __builtin_ia32_cmpneqps (v4sf, v4sf)
  585. v4sf __builtin_ia32_cmpnltps (v4sf, v4sf)
  586. v4sf __builtin_ia32_cmpnleps (v4sf, v4sf)
  587. v4sf __builtin_ia32_cmpngtps (v4sf, v4sf)
  588. v4sf __builtin_ia32_cmpngeps (v4sf, v4sf)
  589. v4sf __builtin_ia32_cmpordps (v4sf, v4sf)
  590. v4sf __builtin_ia32_cmpeqss (v4sf, v4sf)
  591. v4sf __builtin_ia32_cmpltss (v4sf, v4sf)
  592. v4sf __builtin_ia32_cmpless (v4sf, v4sf)
  593. v4sf __builtin_ia32_cmpunordss (v4sf, v4sf)
  594. v4sf __builtin_ia32_cmpneqss (v4sf, v4sf)
  595. v4sf __builtin_ia32_cmpnltss (v4sf, v4sf)
  596. v4sf __builtin_ia32_cmpnless (v4sf, v4sf)
  597. v4sf __builtin_ia32_cmpordss (v4sf, v4sf)
  598. v4sf __builtin_ia32_maxps (v4sf, v4sf)
  599. v4sf __builtin_ia32_maxss (v4sf, v4sf)
  600. v4sf __builtin_ia32_minps (v4sf, v4sf)
  601. v4sf __builtin_ia32_minss (v4sf, v4sf)
  602. v4sf __builtin_ia32_andps (v4sf, v4sf)
  603. v4sf __builtin_ia32_andnps (v4sf, v4sf)
  604. v4sf __builtin_ia32_orps (v4sf, v4sf)
  605. v4sf __builtin_ia32_xorps (v4sf, v4sf)
  606. v4sf __builtin_ia32_movss (v4sf, v4sf)
  607. v4sf __builtin_ia32_movhlps (v4sf, v4sf)
  608. v4sf __builtin_ia32_movlhps (v4sf, v4sf)
  609. v4sf __builtin_ia32_unpckhps (v4sf, v4sf)
  610. v4sf __builtin_ia32_unpcklps (v4sf, v4sf)
  611. v4sf __builtin_ia32_cvtpi2ps (v4sf, v2si)
  612. v4sf __builtin_ia32_cvtsi2ss (v4sf, int)
  613. v2si __builtin_ia32_cvtps2pi (v4sf)
  614. int __builtin_ia32_cvtss2si (v4sf)
  615. v2si __builtin_ia32_cvttps2pi (v4sf)
  616. int __builtin_ia32_cvttss2si (v4sf)
  617. v4sf __builtin_ia32_rcpps (v4sf)
  618. v4sf __builtin_ia32_rsqrtps (v4sf)
  619. v4sf __builtin_ia32_sqrtps (v4sf)
  620. v4sf __builtin_ia32_rcpss (v4sf)
  621. v4sf __builtin_ia32_rsqrtss (v4sf)
  622. v4sf __builtin_ia32_sqrtss (v4sf)
  623. v4sf __builtin_ia32_shufps (v4sf, v4sf, int)
  624. void __builtin_ia32_movntps (float *, v4sf)
  625. int __builtin_ia32_movmskps (v4sf)
  626. </pre></div>
  627. <p>The following built-in functions are available when <samp>-msse</samp> is used.
  628. </p>
  629. <dl compact="compact">
  630. <dt><code>v4sf __builtin_ia32_loadups (float *)</code></dt>
  631. <dd><p>Generates the <code>movups</code> machine instruction as a load from memory.
  632. </p></dd>
  633. <dt><code>void __builtin_ia32_storeups (float *, v4sf)</code></dt>
  634. <dd><p>Generates the <code>movups</code> machine instruction as a store to memory.
  635. </p></dd>
  636. <dt><code>v4sf __builtin_ia32_loadss (float *)</code></dt>
  637. <dd><p>Generates the <code>movss</code> machine instruction as a load from memory.
  638. </p></dd>
  639. <dt><code>v4sf __builtin_ia32_loadhps (v4sf, const v2sf *)</code></dt>
  640. <dd><p>Generates the <code>movhps</code> machine instruction as a load from memory.
  641. </p></dd>
  642. <dt><code>v4sf __builtin_ia32_loadlps (v4sf, const v2sf *)</code></dt>
  643. <dd><p>Generates the <code>movlps</code> machine instruction as a load from memory
  644. </p></dd>
  645. <dt><code>void __builtin_ia32_storehps (v2sf *, v4sf)</code></dt>
  646. <dd><p>Generates the <code>movhps</code> machine instruction as a store to memory.
  647. </p></dd>
  648. <dt><code>void __builtin_ia32_storelps (v2sf *, v4sf)</code></dt>
  649. <dd><p>Generates the <code>movlps</code> machine instruction as a store to memory.
  650. </p></dd>
  651. </dl>
  652. <p>The following built-in functions are available when <samp>-msse2</samp> is used.
  653. All of them generate the machine instruction that is part of the name.
  654. </p>
  655. <div class="smallexample">
  656. <pre class="smallexample">int __builtin_ia32_comisdeq (v2df, v2df)
  657. int __builtin_ia32_comisdlt (v2df, v2df)
  658. int __builtin_ia32_comisdle (v2df, v2df)
  659. int __builtin_ia32_comisdgt (v2df, v2df)
  660. int __builtin_ia32_comisdge (v2df, v2df)
  661. int __builtin_ia32_comisdneq (v2df, v2df)
  662. int __builtin_ia32_ucomisdeq (v2df, v2df)
  663. int __builtin_ia32_ucomisdlt (v2df, v2df)
  664. int __builtin_ia32_ucomisdle (v2df, v2df)
  665. int __builtin_ia32_ucomisdgt (v2df, v2df)
  666. int __builtin_ia32_ucomisdge (v2df, v2df)
  667. int __builtin_ia32_ucomisdneq (v2df, v2df)
  668. v2df __builtin_ia32_cmpeqpd (v2df, v2df)
  669. v2df __builtin_ia32_cmpltpd (v2df, v2df)
  670. v2df __builtin_ia32_cmplepd (v2df, v2df)
  671. v2df __builtin_ia32_cmpgtpd (v2df, v2df)
  672. v2df __builtin_ia32_cmpgepd (v2df, v2df)
  673. v2df __builtin_ia32_cmpunordpd (v2df, v2df)
  674. v2df __builtin_ia32_cmpneqpd (v2df, v2df)
  675. v2df __builtin_ia32_cmpnltpd (v2df, v2df)
  676. v2df __builtin_ia32_cmpnlepd (v2df, v2df)
  677. v2df __builtin_ia32_cmpngtpd (v2df, v2df)
  678. v2df __builtin_ia32_cmpngepd (v2df, v2df)
  679. v2df __builtin_ia32_cmpordpd (v2df, v2df)
  680. v2df __builtin_ia32_cmpeqsd (v2df, v2df)
  681. v2df __builtin_ia32_cmpltsd (v2df, v2df)
  682. v2df __builtin_ia32_cmplesd (v2df, v2df)
  683. v2df __builtin_ia32_cmpunordsd (v2df, v2df)
  684. v2df __builtin_ia32_cmpneqsd (v2df, v2df)
  685. v2df __builtin_ia32_cmpnltsd (v2df, v2df)
  686. v2df __builtin_ia32_cmpnlesd (v2df, v2df)
  687. v2df __builtin_ia32_cmpordsd (v2df, v2df)
  688. v2di __builtin_ia32_paddq (v2di, v2di)
  689. v2di __builtin_ia32_psubq (v2di, v2di)
  690. v2df __builtin_ia32_addpd (v2df, v2df)
  691. v2df __builtin_ia32_subpd (v2df, v2df)
  692. v2df __builtin_ia32_mulpd (v2df, v2df)
  693. v2df __builtin_ia32_divpd (v2df, v2df)
  694. v2df __builtin_ia32_addsd (v2df, v2df)
  695. v2df __builtin_ia32_subsd (v2df, v2df)
  696. v2df __builtin_ia32_mulsd (v2df, v2df)
  697. v2df __builtin_ia32_divsd (v2df, v2df)
  698. v2df __builtin_ia32_minpd (v2df, v2df)
  699. v2df __builtin_ia32_maxpd (v2df, v2df)
  700. v2df __builtin_ia32_minsd (v2df, v2df)
  701. v2df __builtin_ia32_maxsd (v2df, v2df)
  702. v2df __builtin_ia32_andpd (v2df, v2df)
  703. v2df __builtin_ia32_andnpd (v2df, v2df)
  704. v2df __builtin_ia32_orpd (v2df, v2df)
  705. v2df __builtin_ia32_xorpd (v2df, v2df)
  706. v2df __builtin_ia32_movsd (v2df, v2df)
  707. v2df __builtin_ia32_unpckhpd (v2df, v2df)
  708. v2df __builtin_ia32_unpcklpd (v2df, v2df)
  709. v16qi __builtin_ia32_paddb128 (v16qi, v16qi)
  710. v8hi __builtin_ia32_paddw128 (v8hi, v8hi)
  711. v4si __builtin_ia32_paddd128 (v4si, v4si)
  712. v2di __builtin_ia32_paddq128 (v2di, v2di)
  713. v16qi __builtin_ia32_psubb128 (v16qi, v16qi)
  714. v8hi __builtin_ia32_psubw128 (v8hi, v8hi)
  715. v4si __builtin_ia32_psubd128 (v4si, v4si)
  716. v2di __builtin_ia32_psubq128 (v2di, v2di)
  717. v8hi __builtin_ia32_pmullw128 (v8hi, v8hi)
  718. v8hi __builtin_ia32_pmulhw128 (v8hi, v8hi)
  719. v2di __builtin_ia32_pand128 (v2di, v2di)
  720. v2di __builtin_ia32_pandn128 (v2di, v2di)
  721. v2di __builtin_ia32_por128 (v2di, v2di)
  722. v2di __builtin_ia32_pxor128 (v2di, v2di)
  723. v16qi __builtin_ia32_pavgb128 (v16qi, v16qi)
  724. v8hi __builtin_ia32_pavgw128 (v8hi, v8hi)
  725. v16qi __builtin_ia32_pcmpeqb128 (v16qi, v16qi)
  726. v8hi __builtin_ia32_pcmpeqw128 (v8hi, v8hi)
  727. v4si __builtin_ia32_pcmpeqd128 (v4si, v4si)
  728. v16qi __builtin_ia32_pcmpgtb128 (v16qi, v16qi)
  729. v8hi __builtin_ia32_pcmpgtw128 (v8hi, v8hi)
  730. v4si __builtin_ia32_pcmpgtd128 (v4si, v4si)
  731. v16qi __builtin_ia32_pmaxub128 (v16qi, v16qi)
  732. v8hi __builtin_ia32_pmaxsw128 (v8hi, v8hi)
  733. v16qi __builtin_ia32_pminub128 (v16qi, v16qi)
  734. v8hi __builtin_ia32_pminsw128 (v8hi, v8hi)
  735. v16qi __builtin_ia32_punpckhbw128 (v16qi, v16qi)
  736. v8hi __builtin_ia32_punpckhwd128 (v8hi, v8hi)
  737. v4si __builtin_ia32_punpckhdq128 (v4si, v4si)
  738. v2di __builtin_ia32_punpckhqdq128 (v2di, v2di)
  739. v16qi __builtin_ia32_punpcklbw128 (v16qi, v16qi)
  740. v8hi __builtin_ia32_punpcklwd128 (v8hi, v8hi)
  741. v4si __builtin_ia32_punpckldq128 (v4si, v4si)
  742. v2di __builtin_ia32_punpcklqdq128 (v2di, v2di)
  743. v16qi __builtin_ia32_packsswb128 (v8hi, v8hi)
  744. v8hi __builtin_ia32_packssdw128 (v4si, v4si)
  745. v16qi __builtin_ia32_packuswb128 (v8hi, v8hi)
  746. v8hi __builtin_ia32_pmulhuw128 (v8hi, v8hi)
  747. void __builtin_ia32_maskmovdqu (v16qi, v16qi)
  748. v2df __builtin_ia32_loadupd (double *)
  749. void __builtin_ia32_storeupd (double *, v2df)
  750. v2df __builtin_ia32_loadhpd (v2df, double const *)
  751. v2df __builtin_ia32_loadlpd (v2df, double const *)
  752. int __builtin_ia32_movmskpd (v2df)
  753. int __builtin_ia32_pmovmskb128 (v16qi)
  754. void __builtin_ia32_movnti (int *, int)
  755. void __builtin_ia32_movnti64 (long long int *, long long int)
  756. void __builtin_ia32_movntpd (double *, v2df)
  757. void __builtin_ia32_movntdq (v2df *, v2df)
  758. v4si __builtin_ia32_pshufd (v4si, int)
  759. v8hi __builtin_ia32_pshuflw (v8hi, int)
  760. v8hi __builtin_ia32_pshufhw (v8hi, int)
  761. v2di __builtin_ia32_psadbw128 (v16qi, v16qi)
  762. v2df __builtin_ia32_sqrtpd (v2df)
  763. v2df __builtin_ia32_sqrtsd (v2df)
  764. v2df __builtin_ia32_shufpd (v2df, v2df, int)
  765. v2df __builtin_ia32_cvtdq2pd (v4si)
  766. v4sf __builtin_ia32_cvtdq2ps (v4si)
  767. v4si __builtin_ia32_cvtpd2dq (v2df)
  768. v2si __builtin_ia32_cvtpd2pi (v2df)
  769. v4sf __builtin_ia32_cvtpd2ps (v2df)
  770. v4si __builtin_ia32_cvttpd2dq (v2df)
  771. v2si __builtin_ia32_cvttpd2pi (v2df)
  772. v2df __builtin_ia32_cvtpi2pd (v2si)
  773. int __builtin_ia32_cvtsd2si (v2df)
  774. int __builtin_ia32_cvttsd2si (v2df)
  775. long long __builtin_ia32_cvtsd2si64 (v2df)
  776. long long __builtin_ia32_cvttsd2si64 (v2df)
  777. v4si __builtin_ia32_cvtps2dq (v4sf)
  778. v2df __builtin_ia32_cvtps2pd (v4sf)
  779. v4si __builtin_ia32_cvttps2dq (v4sf)
  780. v2df __builtin_ia32_cvtsi2sd (v2df, int)
  781. v2df __builtin_ia32_cvtsi642sd (v2df, long long)
  782. v4sf __builtin_ia32_cvtsd2ss (v4sf, v2df)
  783. v2df __builtin_ia32_cvtss2sd (v2df, v4sf)
  784. void __builtin_ia32_clflush (const void *)
  785. void __builtin_ia32_lfence (void)
  786. void __builtin_ia32_mfence (void)
  787. v16qi __builtin_ia32_loaddqu (const char *)
  788. void __builtin_ia32_storedqu (char *, v16qi)
  789. v1di __builtin_ia32_pmuludq (v2si, v2si)
  790. v2di __builtin_ia32_pmuludq128 (v4si, v4si)
  791. v8hi __builtin_ia32_psllw128 (v8hi, v8hi)
  792. v4si __builtin_ia32_pslld128 (v4si, v4si)
  793. v2di __builtin_ia32_psllq128 (v2di, v2di)
  794. v8hi __builtin_ia32_psrlw128 (v8hi, v8hi)
  795. v4si __builtin_ia32_psrld128 (v4si, v4si)
  796. v2di __builtin_ia32_psrlq128 (v2di, v2di)
  797. v8hi __builtin_ia32_psraw128 (v8hi, v8hi)
  798. v4si __builtin_ia32_psrad128 (v4si, v4si)
  799. v2di __builtin_ia32_pslldqi128 (v2di, int)
  800. v8hi __builtin_ia32_psllwi128 (v8hi, int)
  801. v4si __builtin_ia32_pslldi128 (v4si, int)
  802. v2di __builtin_ia32_psllqi128 (v2di, int)
  803. v2di __builtin_ia32_psrldqi128 (v2di, int)
  804. v8hi __builtin_ia32_psrlwi128 (v8hi, int)
  805. v4si __builtin_ia32_psrldi128 (v4si, int)
  806. v2di __builtin_ia32_psrlqi128 (v2di, int)
  807. v8hi __builtin_ia32_psrawi128 (v8hi, int)
  808. v4si __builtin_ia32_psradi128 (v4si, int)
  809. v4si __builtin_ia32_pmaddwd128 (v8hi, v8hi)
  810. v2di __builtin_ia32_movq128 (v2di)
  811. </pre></div>
  812. <p>The following built-in functions are available when <samp>-msse3</samp> is used.
  813. All of them generate the machine instruction that is part of the name.
  814. </p>
  815. <div class="smallexample">
  816. <pre class="smallexample">v2df __builtin_ia32_addsubpd (v2df, v2df)
  817. v4sf __builtin_ia32_addsubps (v4sf, v4sf)
  818. v2df __builtin_ia32_haddpd (v2df, v2df)
  819. v4sf __builtin_ia32_haddps (v4sf, v4sf)
  820. v2df __builtin_ia32_hsubpd (v2df, v2df)
  821. v4sf __builtin_ia32_hsubps (v4sf, v4sf)
  822. v16qi __builtin_ia32_lddqu (char const *)
  823. void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
  824. v4sf __builtin_ia32_movshdup (v4sf)
  825. v4sf __builtin_ia32_movsldup (v4sf)
  826. void __builtin_ia32_mwait (unsigned int, unsigned int)
  827. </pre></div>
  828. <p>The following built-in functions are available when <samp>-mssse3</samp> is used.
  829. All of them generate the machine instruction that is part of the name.
  830. </p>
  831. <div class="smallexample">
  832. <pre class="smallexample">v2si __builtin_ia32_phaddd (v2si, v2si)
  833. v4hi __builtin_ia32_phaddw (v4hi, v4hi)
  834. v4hi __builtin_ia32_phaddsw (v4hi, v4hi)
  835. v2si __builtin_ia32_phsubd (v2si, v2si)
  836. v4hi __builtin_ia32_phsubw (v4hi, v4hi)
  837. v4hi __builtin_ia32_phsubsw (v4hi, v4hi)
  838. v4hi __builtin_ia32_pmaddubsw (v8qi, v8qi)
  839. v4hi __builtin_ia32_pmulhrsw (v4hi, v4hi)
  840. v8qi __builtin_ia32_pshufb (v8qi, v8qi)
  841. v8qi __builtin_ia32_psignb (v8qi, v8qi)
  842. v2si __builtin_ia32_psignd (v2si, v2si)
  843. v4hi __builtin_ia32_psignw (v4hi, v4hi)
  844. v1di __builtin_ia32_palignr (v1di, v1di, int)
  845. v8qi __builtin_ia32_pabsb (v8qi)
  846. v2si __builtin_ia32_pabsd (v2si)
  847. v4hi __builtin_ia32_pabsw (v4hi)
  848. </pre></div>
  849. <p>The following built-in functions are available when <samp>-mssse3</samp> is used.
  850. All of them generate the machine instruction that is part of the name.
  851. </p>
  852. <div class="smallexample">
  853. <pre class="smallexample">v4si __builtin_ia32_phaddd128 (v4si, v4si)
  854. v8hi __builtin_ia32_phaddw128 (v8hi, v8hi)
  855. v8hi __builtin_ia32_phaddsw128 (v8hi, v8hi)
  856. v4si __builtin_ia32_phsubd128 (v4si, v4si)
  857. v8hi __builtin_ia32_phsubw128 (v8hi, v8hi)
  858. v8hi __builtin_ia32_phsubsw128 (v8hi, v8hi)
  859. v8hi __builtin_ia32_pmaddubsw128 (v16qi, v16qi)
  860. v8hi __builtin_ia32_pmulhrsw128 (v8hi, v8hi)
  861. v16qi __builtin_ia32_pshufb128 (v16qi, v16qi)
  862. v16qi __builtin_ia32_psignb128 (v16qi, v16qi)
  863. v4si __builtin_ia32_psignd128 (v4si, v4si)
  864. v8hi __builtin_ia32_psignw128 (v8hi, v8hi)
  865. v2di __builtin_ia32_palignr128 (v2di, v2di, int)
  866. v16qi __builtin_ia32_pabsb128 (v16qi)
  867. v4si __builtin_ia32_pabsd128 (v4si)
  868. v8hi __builtin_ia32_pabsw128 (v8hi)
  869. </pre></div>
  870. <p>The following built-in functions are available when <samp>-msse4.1</samp> is
  871. used. All of them generate the machine instruction that is part of the
  872. name.
  873. </p>
  874. <div class="smallexample">
  875. <pre class="smallexample">v2df __builtin_ia32_blendpd (v2df, v2df, const int)
  876. v4sf __builtin_ia32_blendps (v4sf, v4sf, const int)
  877. v2df __builtin_ia32_blendvpd (v2df, v2df, v2df)
  878. v4sf __builtin_ia32_blendvps (v4sf, v4sf, v4sf)
  879. v2df __builtin_ia32_dppd (v2df, v2df, const int)
  880. v4sf __builtin_ia32_dpps (v4sf, v4sf, const int)
  881. v4sf __builtin_ia32_insertps128 (v4sf, v4sf, const int)
  882. v2di __builtin_ia32_movntdqa (v2di *);
  883. v16qi __builtin_ia32_mpsadbw128 (v16qi, v16qi, const int)
  884. v8hi __builtin_ia32_packusdw128 (v4si, v4si)
  885. v16qi __builtin_ia32_pblendvb128 (v16qi, v16qi, v16qi)
  886. v8hi __builtin_ia32_pblendw128 (v8hi, v8hi, const int)
  887. v2di __builtin_ia32_pcmpeqq (v2di, v2di)
  888. v8hi __builtin_ia32_phminposuw128 (v8hi)
  889. v16qi __builtin_ia32_pmaxsb128 (v16qi, v16qi)
  890. v4si __builtin_ia32_pmaxsd128 (v4si, v4si)
  891. v4si __builtin_ia32_pmaxud128 (v4si, v4si)
  892. v8hi __builtin_ia32_pmaxuw128 (v8hi, v8hi)
  893. v16qi __builtin_ia32_pminsb128 (v16qi, v16qi)
  894. v4si __builtin_ia32_pminsd128 (v4si, v4si)
  895. v4si __builtin_ia32_pminud128 (v4si, v4si)
  896. v8hi __builtin_ia32_pminuw128 (v8hi, v8hi)
  897. v4si __builtin_ia32_pmovsxbd128 (v16qi)
  898. v2di __builtin_ia32_pmovsxbq128 (v16qi)
  899. v8hi __builtin_ia32_pmovsxbw128 (v16qi)
  900. v2di __builtin_ia32_pmovsxdq128 (v4si)
  901. v4si __builtin_ia32_pmovsxwd128 (v8hi)
  902. v2di __builtin_ia32_pmovsxwq128 (v8hi)
  903. v4si __builtin_ia32_pmovzxbd128 (v16qi)
  904. v2di __builtin_ia32_pmovzxbq128 (v16qi)
  905. v8hi __builtin_ia32_pmovzxbw128 (v16qi)
  906. v2di __builtin_ia32_pmovzxdq128 (v4si)
  907. v4si __builtin_ia32_pmovzxwd128 (v8hi)
  908. v2di __builtin_ia32_pmovzxwq128 (v8hi)
  909. v2di __builtin_ia32_pmuldq128 (v4si, v4si)
  910. v4si __builtin_ia32_pmulld128 (v4si, v4si)
  911. int __builtin_ia32_ptestc128 (v2di, v2di)
  912. int __builtin_ia32_ptestnzc128 (v2di, v2di)
  913. int __builtin_ia32_ptestz128 (v2di, v2di)
  914. v2df __builtin_ia32_roundpd (v2df, const int)
  915. v4sf __builtin_ia32_roundps (v4sf, const int)
  916. v2df __builtin_ia32_roundsd (v2df, v2df, const int)
  917. v4sf __builtin_ia32_roundss (v4sf, v4sf, const int)
  918. </pre></div>
  919. <p>The following built-in functions are available when <samp>-msse4.1</samp> is
  920. used.
  921. </p>
  922. <dl compact="compact">
  923. <dt><code>v4sf __builtin_ia32_vec_set_v4sf (v4sf, float, const int)</code></dt>
  924. <dd><p>Generates the <code>insertps</code> machine instruction.
  925. </p></dd>
  926. <dt><code>int __builtin_ia32_vec_ext_v16qi (v16qi, const int)</code></dt>
  927. <dd><p>Generates the <code>pextrb</code> machine instruction.
  928. </p></dd>
  929. <dt><code>v16qi __builtin_ia32_vec_set_v16qi (v16qi, int, const int)</code></dt>
  930. <dd><p>Generates the <code>pinsrb</code> machine instruction.
  931. </p></dd>
  932. <dt><code>v4si __builtin_ia32_vec_set_v4si (v4si, int, const int)</code></dt>
  933. <dd><p>Generates the <code>pinsrd</code> machine instruction.
  934. </p></dd>
  935. <dt><code>v2di __builtin_ia32_vec_set_v2di (v2di, long long, const int)</code></dt>
  936. <dd><p>Generates the <code>pinsrq</code> machine instruction in 64bit mode.
  937. </p></dd>
  938. </dl>
  939. <p>The following built-in functions are changed to generate new SSE4.1
  940. instructions when <samp>-msse4.1</samp> is used.
  941. </p>
  942. <dl compact="compact">
  943. <dt><code>float __builtin_ia32_vec_ext_v4sf (v4sf, const int)</code></dt>
  944. <dd><p>Generates the <code>extractps</code> machine instruction.
  945. </p></dd>
  946. <dt><code>int __builtin_ia32_vec_ext_v4si (v4si, const int)</code></dt>
  947. <dd><p>Generates the <code>pextrd</code> machine instruction.
  948. </p></dd>
  949. <dt><code>long long __builtin_ia32_vec_ext_v2di (v2di, const int)</code></dt>
  950. <dd><p>Generates the <code>pextrq</code> machine instruction in 64bit mode.
  951. </p></dd>
  952. </dl>
  953. <p>The following built-in functions are available when <samp>-msse4.2</samp> is
  954. used. All of them generate the machine instruction that is part of the
  955. name.
  956. </p>
  957. <div class="smallexample">
  958. <pre class="smallexample">v16qi __builtin_ia32_pcmpestrm128 (v16qi, int, v16qi, int, const int)
  959. int __builtin_ia32_pcmpestri128 (v16qi, int, v16qi, int, const int)
  960. int __builtin_ia32_pcmpestria128 (v16qi, int, v16qi, int, const int)
  961. int __builtin_ia32_pcmpestric128 (v16qi, int, v16qi, int, const int)
  962. int __builtin_ia32_pcmpestrio128 (v16qi, int, v16qi, int, const int)
  963. int __builtin_ia32_pcmpestris128 (v16qi, int, v16qi, int, const int)
  964. int __builtin_ia32_pcmpestriz128 (v16qi, int, v16qi, int, const int)
  965. v16qi __builtin_ia32_pcmpistrm128 (v16qi, v16qi, const int)
  966. int __builtin_ia32_pcmpistri128 (v16qi, v16qi, const int)
  967. int __builtin_ia32_pcmpistria128 (v16qi, v16qi, const int)
  968. int __builtin_ia32_pcmpistric128 (v16qi, v16qi, const int)
  969. int __builtin_ia32_pcmpistrio128 (v16qi, v16qi, const int)
  970. int __builtin_ia32_pcmpistris128 (v16qi, v16qi, const int)
  971. int __builtin_ia32_pcmpistriz128 (v16qi, v16qi, const int)
  972. v2di __builtin_ia32_pcmpgtq (v2di, v2di)
  973. </pre></div>
  974. <p>The following built-in functions are available when <samp>-msse4.2</samp> is
  975. used.
  976. </p>
  977. <dl compact="compact">
  978. <dt><code>unsigned int __builtin_ia32_crc32qi (unsigned int, unsigned char)</code></dt>
  979. <dd><p>Generates the <code>crc32b</code> machine instruction.
  980. </p></dd>
  981. <dt><code>unsigned int __builtin_ia32_crc32hi (unsigned int, unsigned short)</code></dt>
  982. <dd><p>Generates the <code>crc32w</code> machine instruction.
  983. </p></dd>
  984. <dt><code>unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int)</code></dt>
  985. <dd><p>Generates the <code>crc32l</code> machine instruction.
  986. </p></dd>
  987. <dt><code>unsigned long long __builtin_ia32_crc32di (unsigned long long, unsigned long long)</code></dt>
  988. <dd><p>Generates the <code>crc32q</code> machine instruction.
  989. </p></dd>
  990. </dl>
  991. <p>The following built-in functions are changed to generate new SSE4.2
  992. instructions when <samp>-msse4.2</samp> is used.
  993. </p>
  994. <dl compact="compact">
  995. <dt><code>int __builtin_popcount (unsigned int)</code></dt>
  996. <dd><p>Generates the <code>popcntl</code> machine instruction.
  997. </p></dd>
  998. <dt><code>int __builtin_popcountl (unsigned long)</code></dt>
  999. <dd><p>Generates the <code>popcntl</code> or <code>popcntq</code> machine instruction,
  1000. depending on the size of <code>unsigned long</code>.
  1001. </p></dd>
  1002. <dt><code>int __builtin_popcountll (unsigned long long)</code></dt>
  1003. <dd><p>Generates the <code>popcntq</code> machine instruction.
  1004. </p></dd>
  1005. </dl>
  1006. <p>The following built-in functions are available when <samp>-mavx</samp> is
  1007. used. All of them generate the machine instruction that is part of the
  1008. name.
  1009. </p>
  1010. <div class="smallexample">
  1011. <pre class="smallexample">v4df __builtin_ia32_addpd256 (v4df,v4df)
  1012. v8sf __builtin_ia32_addps256 (v8sf,v8sf)
  1013. v4df __builtin_ia32_addsubpd256 (v4df,v4df)
  1014. v8sf __builtin_ia32_addsubps256 (v8sf,v8sf)
  1015. v4df __builtin_ia32_andnpd256 (v4df,v4df)
  1016. v8sf __builtin_ia32_andnps256 (v8sf,v8sf)
  1017. v4df __builtin_ia32_andpd256 (v4df,v4df)
  1018. v8sf __builtin_ia32_andps256 (v8sf,v8sf)
  1019. v4df __builtin_ia32_blendpd256 (v4df,v4df,int)
  1020. v8sf __builtin_ia32_blendps256 (v8sf,v8sf,int)
  1021. v4df __builtin_ia32_blendvpd256 (v4df,v4df,v4df)
  1022. v8sf __builtin_ia32_blendvps256 (v8sf,v8sf,v8sf)
  1023. v2df __builtin_ia32_cmppd (v2df,v2df,int)
  1024. v4df __builtin_ia32_cmppd256 (v4df,v4df,int)
  1025. v4sf __builtin_ia32_cmpps (v4sf,v4sf,int)
  1026. v8sf __builtin_ia32_cmpps256 (v8sf,v8sf,int)
  1027. v2df __builtin_ia32_cmpsd (v2df,v2df,int)
  1028. v4sf __builtin_ia32_cmpss (v4sf,v4sf,int)
  1029. v4df __builtin_ia32_cvtdq2pd256 (v4si)
  1030. v8sf __builtin_ia32_cvtdq2ps256 (v8si)
  1031. v4si __builtin_ia32_cvtpd2dq256 (v4df)
  1032. v4sf __builtin_ia32_cvtpd2ps256 (v4df)
  1033. v8si __builtin_ia32_cvtps2dq256 (v8sf)
  1034. v4df __builtin_ia32_cvtps2pd256 (v4sf)
  1035. v4si __builtin_ia32_cvttpd2dq256 (v4df)
  1036. v8si __builtin_ia32_cvttps2dq256 (v8sf)
  1037. v4df __builtin_ia32_divpd256 (v4df,v4df)
  1038. v8sf __builtin_ia32_divps256 (v8sf,v8sf)
  1039. v8sf __builtin_ia32_dpps256 (v8sf,v8sf,int)
  1040. v4df __builtin_ia32_haddpd256 (v4df,v4df)
  1041. v8sf __builtin_ia32_haddps256 (v8sf,v8sf)
  1042. v4df __builtin_ia32_hsubpd256 (v4df,v4df)
  1043. v8sf __builtin_ia32_hsubps256 (v8sf,v8sf)
  1044. v32qi __builtin_ia32_lddqu256 (pcchar)
  1045. v32qi __builtin_ia32_loaddqu256 (pcchar)
  1046. v4df __builtin_ia32_loadupd256 (pcdouble)
  1047. v8sf __builtin_ia32_loadups256 (pcfloat)
  1048. v2df __builtin_ia32_maskloadpd (pcv2df,v2df)
  1049. v4df __builtin_ia32_maskloadpd256 (pcv4df,v4df)
  1050. v4sf __builtin_ia32_maskloadps (pcv4sf,v4sf)
  1051. v8sf __builtin_ia32_maskloadps256 (pcv8sf,v8sf)
  1052. void __builtin_ia32_maskstorepd (pv2df,v2df,v2df)
  1053. void __builtin_ia32_maskstorepd256 (pv4df,v4df,v4df)
  1054. void __builtin_ia32_maskstoreps (pv4sf,v4sf,v4sf)
  1055. void __builtin_ia32_maskstoreps256 (pv8sf,v8sf,v8sf)
  1056. v4df __builtin_ia32_maxpd256 (v4df,v4df)
  1057. v8sf __builtin_ia32_maxps256 (v8sf,v8sf)
  1058. v4df __builtin_ia32_minpd256 (v4df,v4df)
  1059. v8sf __builtin_ia32_minps256 (v8sf,v8sf)
  1060. v4df __builtin_ia32_movddup256 (v4df)
  1061. int __builtin_ia32_movmskpd256 (v4df)
  1062. int __builtin_ia32_movmskps256 (v8sf)
  1063. v8sf __builtin_ia32_movshdup256 (v8sf)
  1064. v8sf __builtin_ia32_movsldup256 (v8sf)
  1065. v4df __builtin_ia32_mulpd256 (v4df,v4df)
  1066. v8sf __builtin_ia32_mulps256 (v8sf,v8sf)
  1067. v4df __builtin_ia32_orpd256 (v4df,v4df)
  1068. v8sf __builtin_ia32_orps256 (v8sf,v8sf)
  1069. v2df __builtin_ia32_pd_pd256 (v4df)
  1070. v4df __builtin_ia32_pd256_pd (v2df)
  1071. v4sf __builtin_ia32_ps_ps256 (v8sf)
  1072. v8sf __builtin_ia32_ps256_ps (v4sf)
  1073. int __builtin_ia32_ptestc256 (v4di,v4di,ptest)
  1074. int __builtin_ia32_ptestnzc256 (v4di,v4di,ptest)
  1075. int __builtin_ia32_ptestz256 (v4di,v4di,ptest)
  1076. v8sf __builtin_ia32_rcpps256 (v8sf)
  1077. v4df __builtin_ia32_roundpd256 (v4df,int)
  1078. v8sf __builtin_ia32_roundps256 (v8sf,int)
  1079. v8sf __builtin_ia32_rsqrtps_nr256 (v8sf)
  1080. v8sf __builtin_ia32_rsqrtps256 (v8sf)
  1081. v4df __builtin_ia32_shufpd256 (v4df,v4df,int)
  1082. v8sf __builtin_ia32_shufps256 (v8sf,v8sf,int)
  1083. v4si __builtin_ia32_si_si256 (v8si)
  1084. v8si __builtin_ia32_si256_si (v4si)
  1085. v4df __builtin_ia32_sqrtpd256 (v4df)
  1086. v8sf __builtin_ia32_sqrtps_nr256 (v8sf)
  1087. v8sf __builtin_ia32_sqrtps256 (v8sf)
  1088. void __builtin_ia32_storedqu256 (pchar,v32qi)
  1089. void __builtin_ia32_storeupd256 (pdouble,v4df)
  1090. void __builtin_ia32_storeups256 (pfloat,v8sf)
  1091. v4df __builtin_ia32_subpd256 (v4df,v4df)
  1092. v8sf __builtin_ia32_subps256 (v8sf,v8sf)
  1093. v4df __builtin_ia32_unpckhpd256 (v4df,v4df)
  1094. v8sf __builtin_ia32_unpckhps256 (v8sf,v8sf)
  1095. v4df __builtin_ia32_unpcklpd256 (v4df,v4df)
  1096. v8sf __builtin_ia32_unpcklps256 (v8sf,v8sf)
  1097. v4df __builtin_ia32_vbroadcastf128_pd256 (pcv2df)
  1098. v8sf __builtin_ia32_vbroadcastf128_ps256 (pcv4sf)
  1099. v4df __builtin_ia32_vbroadcastsd256 (pcdouble)
  1100. v4sf __builtin_ia32_vbroadcastss (pcfloat)
  1101. v8sf __builtin_ia32_vbroadcastss256 (pcfloat)
  1102. v2df __builtin_ia32_vextractf128_pd256 (v4df,int)
  1103. v4sf __builtin_ia32_vextractf128_ps256 (v8sf,int)
  1104. v4si __builtin_ia32_vextractf128_si256 (v8si,int)
  1105. v4df __builtin_ia32_vinsertf128_pd256 (v4df,v2df,int)
  1106. v8sf __builtin_ia32_vinsertf128_ps256 (v8sf,v4sf,int)
  1107. v8si __builtin_ia32_vinsertf128_si256 (v8si,v4si,int)
  1108. v4df __builtin_ia32_vperm2f128_pd256 (v4df,v4df,int)
  1109. v8sf __builtin_ia32_vperm2f128_ps256 (v8sf,v8sf,int)
  1110. v8si __builtin_ia32_vperm2f128_si256 (v8si,v8si,int)
  1111. v2df __builtin_ia32_vpermil2pd (v2df,v2df,v2di,int)
  1112. v4df __builtin_ia32_vpermil2pd256 (v4df,v4df,v4di,int)
  1113. v4sf __builtin_ia32_vpermil2ps (v4sf,v4sf,v4si,int)
  1114. v8sf __builtin_ia32_vpermil2ps256 (v8sf,v8sf,v8si,int)
  1115. v2df __builtin_ia32_vpermilpd (v2df,int)
  1116. v4df __builtin_ia32_vpermilpd256 (v4df,int)
  1117. v4sf __builtin_ia32_vpermilps (v4sf,int)
  1118. v8sf __builtin_ia32_vpermilps256 (v8sf,int)
  1119. v2df __builtin_ia32_vpermilvarpd (v2df,v2di)
  1120. v4df __builtin_ia32_vpermilvarpd256 (v4df,v4di)
  1121. v4sf __builtin_ia32_vpermilvarps (v4sf,v4si)
  1122. v8sf __builtin_ia32_vpermilvarps256 (v8sf,v8si)
  1123. int __builtin_ia32_vtestcpd (v2df,v2df,ptest)
  1124. int __builtin_ia32_vtestcpd256 (v4df,v4df,ptest)
  1125. int __builtin_ia32_vtestcps (v4sf,v4sf,ptest)
  1126. int __builtin_ia32_vtestcps256 (v8sf,v8sf,ptest)
  1127. int __builtin_ia32_vtestnzcpd (v2df,v2df,ptest)
  1128. int __builtin_ia32_vtestnzcpd256 (v4df,v4df,ptest)
  1129. int __builtin_ia32_vtestnzcps (v4sf,v4sf,ptest)
  1130. int __builtin_ia32_vtestnzcps256 (v8sf,v8sf,ptest)
  1131. int __builtin_ia32_vtestzpd (v2df,v2df,ptest)
  1132. int __builtin_ia32_vtestzpd256 (v4df,v4df,ptest)
  1133. int __builtin_ia32_vtestzps (v4sf,v4sf,ptest)
  1134. int __builtin_ia32_vtestzps256 (v8sf,v8sf,ptest)
  1135. void __builtin_ia32_vzeroall (void)
  1136. void __builtin_ia32_vzeroupper (void)
  1137. v4df __builtin_ia32_xorpd256 (v4df,v4df)
  1138. v8sf __builtin_ia32_xorps256 (v8sf,v8sf)
  1139. </pre></div>
  1140. <p>The following built-in functions are available when <samp>-mavx2</samp> is
  1141. used. All of them generate the machine instruction that is part of the
  1142. name.
  1143. </p>
  1144. <div class="smallexample">
  1145. <pre class="smallexample">v32qi __builtin_ia32_mpsadbw256 (v32qi,v32qi,int)
  1146. v32qi __builtin_ia32_pabsb256 (v32qi)
  1147. v16hi __builtin_ia32_pabsw256 (v16hi)
  1148. v8si __builtin_ia32_pabsd256 (v8si)
  1149. v16hi __builtin_ia32_packssdw256 (v8si,v8si)
  1150. v32qi __builtin_ia32_packsswb256 (v16hi,v16hi)
  1151. v16hi __builtin_ia32_packusdw256 (v8si,v8si)
  1152. v32qi __builtin_ia32_packuswb256 (v16hi,v16hi)
  1153. v32qi __builtin_ia32_paddb256 (v32qi,v32qi)
  1154. v16hi __builtin_ia32_paddw256 (v16hi,v16hi)
  1155. v8si __builtin_ia32_paddd256 (v8si,v8si)
  1156. v4di __builtin_ia32_paddq256 (v4di,v4di)
  1157. v32qi __builtin_ia32_paddsb256 (v32qi,v32qi)
  1158. v16hi __builtin_ia32_paddsw256 (v16hi,v16hi)
  1159. v32qi __builtin_ia32_paddusb256 (v32qi,v32qi)
  1160. v16hi __builtin_ia32_paddusw256 (v16hi,v16hi)
  1161. v4di __builtin_ia32_palignr256 (v4di,v4di,int)
  1162. v4di __builtin_ia32_andsi256 (v4di,v4di)
  1163. v4di __builtin_ia32_andnotsi256 (v4di,v4di)
  1164. v32qi __builtin_ia32_pavgb256 (v32qi,v32qi)
  1165. v16hi __builtin_ia32_pavgw256 (v16hi,v16hi)
  1166. v32qi __builtin_ia32_pblendvb256 (v32qi,v32qi,v32qi)
  1167. v16hi __builtin_ia32_pblendw256 (v16hi,v16hi,int)
  1168. v32qi __builtin_ia32_pcmpeqb256 (v32qi,v32qi)
  1169. v16hi __builtin_ia32_pcmpeqw256 (v16hi,v16hi)
  1170. v8si __builtin_ia32_pcmpeqd256 (c8si,v8si)
  1171. v4di __builtin_ia32_pcmpeqq256 (v4di,v4di)
  1172. v32qi __builtin_ia32_pcmpgtb256 (v32qi,v32qi)
  1173. v16hi __builtin_ia32_pcmpgtw256 (16hi,v16hi)
  1174. v8si __builtin_ia32_pcmpgtd256 (v8si,v8si)
  1175. v4di __builtin_ia32_pcmpgtq256 (v4di,v4di)
  1176. v16hi __builtin_ia32_phaddw256 (v16hi,v16hi)
  1177. v8si __builtin_ia32_phaddd256 (v8si,v8si)
  1178. v16hi __builtin_ia32_phaddsw256 (v16hi,v16hi)
  1179. v16hi __builtin_ia32_phsubw256 (v16hi,v16hi)
  1180. v8si __builtin_ia32_phsubd256 (v8si,v8si)
  1181. v16hi __builtin_ia32_phsubsw256 (v16hi,v16hi)
  1182. v32qi __builtin_ia32_pmaddubsw256 (v32qi,v32qi)
  1183. v16hi __builtin_ia32_pmaddwd256 (v16hi,v16hi)
  1184. v32qi __builtin_ia32_pmaxsb256 (v32qi,v32qi)
  1185. v16hi __builtin_ia32_pmaxsw256 (v16hi,v16hi)
  1186. v8si __builtin_ia32_pmaxsd256 (v8si,v8si)
  1187. v32qi __builtin_ia32_pmaxub256 (v32qi,v32qi)
  1188. v16hi __builtin_ia32_pmaxuw256 (v16hi,v16hi)
  1189. v8si __builtin_ia32_pmaxud256 (v8si,v8si)
  1190. v32qi __builtin_ia32_pminsb256 (v32qi,v32qi)
  1191. v16hi __builtin_ia32_pminsw256 (v16hi,v16hi)
  1192. v8si __builtin_ia32_pminsd256 (v8si,v8si)
  1193. v32qi __builtin_ia32_pminub256 (v32qi,v32qi)
  1194. v16hi __builtin_ia32_pminuw256 (v16hi,v16hi)
  1195. v8si __builtin_ia32_pminud256 (v8si,v8si)
  1196. int __builtin_ia32_pmovmskb256 (v32qi)
  1197. v16hi __builtin_ia32_pmovsxbw256 (v16qi)
  1198. v8si __builtin_ia32_pmovsxbd256 (v16qi)
  1199. v4di __builtin_ia32_pmovsxbq256 (v16qi)
  1200. v8si __builtin_ia32_pmovsxwd256 (v8hi)
  1201. v4di __builtin_ia32_pmovsxwq256 (v8hi)
  1202. v4di __builtin_ia32_pmovsxdq256 (v4si)
  1203. v16hi __builtin_ia32_pmovzxbw256 (v16qi)
  1204. v8si __builtin_ia32_pmovzxbd256 (v16qi)
  1205. v4di __builtin_ia32_pmovzxbq256 (v16qi)
  1206. v8si __builtin_ia32_pmovzxwd256 (v8hi)
  1207. v4di __builtin_ia32_pmovzxwq256 (v8hi)
  1208. v4di __builtin_ia32_pmovzxdq256 (v4si)
  1209. v4di __builtin_ia32_pmuldq256 (v8si,v8si)
  1210. v16hi __builtin_ia32_pmulhrsw256 (v16hi, v16hi)
  1211. v16hi __builtin_ia32_pmulhuw256 (v16hi,v16hi)
  1212. v16hi __builtin_ia32_pmulhw256 (v16hi,v16hi)
  1213. v16hi __builtin_ia32_pmullw256 (v16hi,v16hi)
  1214. v8si __builtin_ia32_pmulld256 (v8si,v8si)
  1215. v4di __builtin_ia32_pmuludq256 (v8si,v8si)
  1216. v4di __builtin_ia32_por256 (v4di,v4di)
  1217. v16hi __builtin_ia32_psadbw256 (v32qi,v32qi)
  1218. v32qi __builtin_ia32_pshufb256 (v32qi,v32qi)
  1219. v8si __builtin_ia32_pshufd256 (v8si,int)
  1220. v16hi __builtin_ia32_pshufhw256 (v16hi,int)
  1221. v16hi __builtin_ia32_pshuflw256 (v16hi,int)
  1222. v32qi __builtin_ia32_psignb256 (v32qi,v32qi)
  1223. v16hi __builtin_ia32_psignw256 (v16hi,v16hi)
  1224. v8si __builtin_ia32_psignd256 (v8si,v8si)
  1225. v4di __builtin_ia32_pslldqi256 (v4di,int)
  1226. v16hi __builtin_ia32_psllwi256 (16hi,int)
  1227. v16hi __builtin_ia32_psllw256(v16hi,v8hi)
  1228. v8si __builtin_ia32_pslldi256 (v8si,int)
  1229. v8si __builtin_ia32_pslld256(v8si,v4si)
  1230. v4di __builtin_ia32_psllqi256 (v4di,int)
  1231. v4di __builtin_ia32_psllq256(v4di,v2di)
  1232. v16hi __builtin_ia32_psrawi256 (v16hi,int)
  1233. v16hi __builtin_ia32_psraw256 (v16hi,v8hi)
  1234. v8si __builtin_ia32_psradi256 (v8si,int)
  1235. v8si __builtin_ia32_psrad256 (v8si,v4si)
  1236. v4di __builtin_ia32_psrldqi256 (v4di, int)
  1237. v16hi __builtin_ia32_psrlwi256 (v16hi,int)
  1238. v16hi __builtin_ia32_psrlw256 (v16hi,v8hi)
  1239. v8si __builtin_ia32_psrldi256 (v8si,int)
  1240. v8si __builtin_ia32_psrld256 (v8si,v4si)
  1241. v4di __builtin_ia32_psrlqi256 (v4di,int)
  1242. v4di __builtin_ia32_psrlq256(v4di,v2di)
  1243. v32qi __builtin_ia32_psubb256 (v32qi,v32qi)
  1244. v32hi __builtin_ia32_psubw256 (v16hi,v16hi)
  1245. v8si __builtin_ia32_psubd256 (v8si,v8si)
  1246. v4di __builtin_ia32_psubq256 (v4di,v4di)
  1247. v32qi __builtin_ia32_psubsb256 (v32qi,v32qi)
  1248. v16hi __builtin_ia32_psubsw256 (v16hi,v16hi)
  1249. v32qi __builtin_ia32_psubusb256 (v32qi,v32qi)
  1250. v16hi __builtin_ia32_psubusw256 (v16hi,v16hi)
  1251. v32qi __builtin_ia32_punpckhbw256 (v32qi,v32qi)
  1252. v16hi __builtin_ia32_punpckhwd256 (v16hi,v16hi)
  1253. v8si __builtin_ia32_punpckhdq256 (v8si,v8si)
  1254. v4di __builtin_ia32_punpckhqdq256 (v4di,v4di)
  1255. v32qi __builtin_ia32_punpcklbw256 (v32qi,v32qi)
  1256. v16hi __builtin_ia32_punpcklwd256 (v16hi,v16hi)
  1257. v8si __builtin_ia32_punpckldq256 (v8si,v8si)
  1258. v4di __builtin_ia32_punpcklqdq256 (v4di,v4di)
  1259. v4di __builtin_ia32_pxor256 (v4di,v4di)
  1260. v4di __builtin_ia32_movntdqa256 (pv4di)
  1261. v4sf __builtin_ia32_vbroadcastss_ps (v4sf)
  1262. v8sf __builtin_ia32_vbroadcastss_ps256 (v4sf)
  1263. v4df __builtin_ia32_vbroadcastsd_pd256 (v2df)
  1264. v4di __builtin_ia32_vbroadcastsi256 (v2di)
  1265. v4si __builtin_ia32_pblendd128 (v4si,v4si)
  1266. v8si __builtin_ia32_pblendd256 (v8si,v8si)
  1267. v32qi __builtin_ia32_pbroadcastb256 (v16qi)
  1268. v16hi __builtin_ia32_pbroadcastw256 (v8hi)
  1269. v8si __builtin_ia32_pbroadcastd256 (v4si)
  1270. v4di __builtin_ia32_pbroadcastq256 (v2di)
  1271. v16qi __builtin_ia32_pbroadcastb128 (v16qi)
  1272. v8hi __builtin_ia32_pbroadcastw128 (v8hi)
  1273. v4si __builtin_ia32_pbroadcastd128 (v4si)
  1274. v2di __builtin_ia32_pbroadcastq128 (v2di)
  1275. v8si __builtin_ia32_permvarsi256 (v8si,v8si)
  1276. v4df __builtin_ia32_permdf256 (v4df,int)
  1277. v8sf __builtin_ia32_permvarsf256 (v8sf,v8sf)
  1278. v4di __builtin_ia32_permdi256 (v4di,int)
  1279. v4di __builtin_ia32_permti256 (v4di,v4di,int)
  1280. v4di __builtin_ia32_extract128i256 (v4di,int)
  1281. v4di __builtin_ia32_insert128i256 (v4di,v2di,int)
  1282. v8si __builtin_ia32_maskloadd256 (pcv8si,v8si)
  1283. v4di __builtin_ia32_maskloadq256 (pcv4di,v4di)
  1284. v4si __builtin_ia32_maskloadd (pcv4si,v4si)
  1285. v2di __builtin_ia32_maskloadq (pcv2di,v2di)
  1286. void __builtin_ia32_maskstored256 (pv8si,v8si,v8si)
  1287. void __builtin_ia32_maskstoreq256 (pv4di,v4di,v4di)
  1288. void __builtin_ia32_maskstored (pv4si,v4si,v4si)
  1289. void __builtin_ia32_maskstoreq (pv2di,v2di,v2di)
  1290. v8si __builtin_ia32_psllv8si (v8si,v8si)
  1291. v4si __builtin_ia32_psllv4si (v4si,v4si)
  1292. v4di __builtin_ia32_psllv4di (v4di,v4di)
  1293. v2di __builtin_ia32_psllv2di (v2di,v2di)
  1294. v8si __builtin_ia32_psrav8si (v8si,v8si)
  1295. v4si __builtin_ia32_psrav4si (v4si,v4si)
  1296. v8si __builtin_ia32_psrlv8si (v8si,v8si)
  1297. v4si __builtin_ia32_psrlv4si (v4si,v4si)
  1298. v4di __builtin_ia32_psrlv4di (v4di,v4di)
  1299. v2di __builtin_ia32_psrlv2di (v2di,v2di)
  1300. v2df __builtin_ia32_gathersiv2df (v2df, pcdouble,v4si,v2df,int)
  1301. v4df __builtin_ia32_gathersiv4df (v4df, pcdouble,v4si,v4df,int)
  1302. v2df __builtin_ia32_gatherdiv2df (v2df, pcdouble,v2di,v2df,int)
  1303. v4df __builtin_ia32_gatherdiv4df (v4df, pcdouble,v4di,v4df,int)
  1304. v4sf __builtin_ia32_gathersiv4sf (v4sf, pcfloat,v4si,v4sf,int)
  1305. v8sf __builtin_ia32_gathersiv8sf (v8sf, pcfloat,v8si,v8sf,int)
  1306. v4sf __builtin_ia32_gatherdiv4sf (v4sf, pcfloat,v2di,v4sf,int)
  1307. v4sf __builtin_ia32_gatherdiv4sf256 (v4sf, pcfloat,v4di,v4sf,int)
  1308. v2di __builtin_ia32_gathersiv2di (v2di, pcint64,v4si,v2di,int)
  1309. v4di __builtin_ia32_gathersiv4di (v4di, pcint64,v4si,v4di,int)
  1310. v2di __builtin_ia32_gatherdiv2di (v2di, pcint64,v2di,v2di,int)
  1311. v4di __builtin_ia32_gatherdiv4di (v4di, pcint64,v4di,v4di,int)
  1312. v4si __builtin_ia32_gathersiv4si (v4si, pcint,v4si,v4si,int)
  1313. v8si __builtin_ia32_gathersiv8si (v8si, pcint,v8si,v8si,int)
  1314. v4si __builtin_ia32_gatherdiv4si (v4si, pcint,v2di,v4si,int)
  1315. v4si __builtin_ia32_gatherdiv4si256 (v4si, pcint,v4di,v4si,int)
  1316. </pre></div>
  1317. <p>The following built-in functions are available when <samp>-maes</samp> is
  1318. used. All of them generate the machine instruction that is part of the
  1319. name.
  1320. </p>
  1321. <div class="smallexample">
  1322. <pre class="smallexample">v2di __builtin_ia32_aesenc128 (v2di, v2di)
  1323. v2di __builtin_ia32_aesenclast128 (v2di, v2di)
  1324. v2di __builtin_ia32_aesdec128 (v2di, v2di)
  1325. v2di __builtin_ia32_aesdeclast128 (v2di, v2di)
  1326. v2di __builtin_ia32_aeskeygenassist128 (v2di, const int)
  1327. v2di __builtin_ia32_aesimc128 (v2di)
  1328. </pre></div>
  1329. <p>The following built-in function is available when <samp>-mpclmul</samp> is
  1330. used.
  1331. </p>
  1332. <dl compact="compact">
  1333. <dt><code>v2di __builtin_ia32_pclmulqdq128 (v2di, v2di, const int)</code></dt>
  1334. <dd><p>Generates the <code>pclmulqdq</code> machine instruction.
  1335. </p></dd>
  1336. </dl>
  1337. <p>The following built-in function is available when <samp>-mfsgsbase</samp> is
  1338. used. All of them generate the machine instruction that is part of the
  1339. name.
  1340. </p>
  1341. <div class="smallexample">
  1342. <pre class="smallexample">unsigned int __builtin_ia32_rdfsbase32 (void)
  1343. unsigned long long __builtin_ia32_rdfsbase64 (void)
  1344. unsigned int __builtin_ia32_rdgsbase32 (void)
  1345. unsigned long long __builtin_ia32_rdgsbase64 (void)
  1346. void _writefsbase_u32 (unsigned int)
  1347. void _writefsbase_u64 (unsigned long long)
  1348. void _writegsbase_u32 (unsigned int)
  1349. void _writegsbase_u64 (unsigned long long)
  1350. </pre></div>
  1351. <p>The following built-in function is available when <samp>-mrdrnd</samp> is
  1352. used. All of them generate the machine instruction that is part of the
  1353. name.
  1354. </p>
  1355. <div class="smallexample">
  1356. <pre class="smallexample">unsigned int __builtin_ia32_rdrand16_step (unsigned short *)
  1357. unsigned int __builtin_ia32_rdrand32_step (unsigned int *)
  1358. unsigned int __builtin_ia32_rdrand64_step (unsigned long long *)
  1359. </pre></div>
  1360. <p>The following built-in function is available when <samp>-mptwrite</samp> is
  1361. used. All of them generate the machine instruction that is part of the
  1362. name.
  1363. </p>
  1364. <div class="smallexample">
  1365. <pre class="smallexample">void __builtin_ia32_ptwrite32 (unsigned)
  1366. void __builtin_ia32_ptwrite64 (unsigned long long)
  1367. </pre></div>
  1368. <p>The following built-in functions are available when <samp>-msse4a</samp> is used.
  1369. All of them generate the machine instruction that is part of the name.
  1370. </p>
  1371. <div class="smallexample">
  1372. <pre class="smallexample">void __builtin_ia32_movntsd (double *, v2df)
  1373. void __builtin_ia32_movntss (float *, v4sf)
  1374. v2di __builtin_ia32_extrq (v2di, v16qi)
  1375. v2di __builtin_ia32_extrqi (v2di, const unsigned int, const unsigned int)
  1376. v2di __builtin_ia32_insertq (v2di, v2di)
  1377. v2di __builtin_ia32_insertqi (v2di, v2di, const unsigned int, const unsigned int)
  1378. </pre></div>
  1379. <p>The following built-in functions are available when <samp>-mxop</samp> is used.
  1380. </p><div class="smallexample">
  1381. <pre class="smallexample">v2df __builtin_ia32_vfrczpd (v2df)
  1382. v4sf __builtin_ia32_vfrczps (v4sf)
  1383. v2df __builtin_ia32_vfrczsd (v2df)
  1384. v4sf __builtin_ia32_vfrczss (v4sf)
  1385. v4df __builtin_ia32_vfrczpd256 (v4df)
  1386. v8sf __builtin_ia32_vfrczps256 (v8sf)
  1387. v2di __builtin_ia32_vpcmov (v2di, v2di, v2di)
  1388. v2di __builtin_ia32_vpcmov_v2di (v2di, v2di, v2di)
  1389. v4si __builtin_ia32_vpcmov_v4si (v4si, v4si, v4si)
  1390. v8hi __builtin_ia32_vpcmov_v8hi (v8hi, v8hi, v8hi)
  1391. v16qi __builtin_ia32_vpcmov_v16qi (v16qi, v16qi, v16qi)
  1392. v2df __builtin_ia32_vpcmov_v2df (v2df, v2df, v2df)
  1393. v4sf __builtin_ia32_vpcmov_v4sf (v4sf, v4sf, v4sf)
  1394. v4di __builtin_ia32_vpcmov_v4di256 (v4di, v4di, v4di)
  1395. v8si __builtin_ia32_vpcmov_v8si256 (v8si, v8si, v8si)
  1396. v16hi __builtin_ia32_vpcmov_v16hi256 (v16hi, v16hi, v16hi)
  1397. v32qi __builtin_ia32_vpcmov_v32qi256 (v32qi, v32qi, v32qi)
  1398. v4df __builtin_ia32_vpcmov_v4df256 (v4df, v4df, v4df)
  1399. v8sf __builtin_ia32_vpcmov_v8sf256 (v8sf, v8sf, v8sf)
  1400. v16qi __builtin_ia32_vpcomeqb (v16qi, v16qi)
  1401. v8hi __builtin_ia32_vpcomeqw (v8hi, v8hi)
  1402. v4si __builtin_ia32_vpcomeqd (v4si, v4si)
  1403. v2di __builtin_ia32_vpcomeqq (v2di, v2di)
  1404. v16qi __builtin_ia32_vpcomequb (v16qi, v16qi)
  1405. v4si __builtin_ia32_vpcomequd (v4si, v4si)
  1406. v2di __builtin_ia32_vpcomequq (v2di, v2di)
  1407. v8hi __builtin_ia32_vpcomequw (v8hi, v8hi)
  1408. v8hi __builtin_ia32_vpcomeqw (v8hi, v8hi)
  1409. v16qi __builtin_ia32_vpcomfalseb (v16qi, v16qi)
  1410. v4si __builtin_ia32_vpcomfalsed (v4si, v4si)
  1411. v2di __builtin_ia32_vpcomfalseq (v2di, v2di)
  1412. v16qi __builtin_ia32_vpcomfalseub (v16qi, v16qi)
  1413. v4si __builtin_ia32_vpcomfalseud (v4si, v4si)
  1414. v2di __builtin_ia32_vpcomfalseuq (v2di, v2di)
  1415. v8hi __builtin_ia32_vpcomfalseuw (v8hi, v8hi)
  1416. v8hi __builtin_ia32_vpcomfalsew (v8hi, v8hi)
  1417. v16qi __builtin_ia32_vpcomgeb (v16qi, v16qi)
  1418. v4si __builtin_ia32_vpcomged (v4si, v4si)
  1419. v2di __builtin_ia32_vpcomgeq (v2di, v2di)
  1420. v16qi __builtin_ia32_vpcomgeub (v16qi, v16qi)
  1421. v4si __builtin_ia32_vpcomgeud (v4si, v4si)
  1422. v2di __builtin_ia32_vpcomgeuq (v2di, v2di)
  1423. v8hi __builtin_ia32_vpcomgeuw (v8hi, v8hi)
  1424. v8hi __builtin_ia32_vpcomgew (v8hi, v8hi)
  1425. v16qi __builtin_ia32_vpcomgtb (v16qi, v16qi)
  1426. v4si __builtin_ia32_vpcomgtd (v4si, v4si)
  1427. v2di __builtin_ia32_vpcomgtq (v2di, v2di)
  1428. v16qi __builtin_ia32_vpcomgtub (v16qi, v16qi)
  1429. v4si __builtin_ia32_vpcomgtud (v4si, v4si)
  1430. v2di __builtin_ia32_vpcomgtuq (v2di, v2di)
  1431. v8hi __builtin_ia32_vpcomgtuw (v8hi, v8hi)
  1432. v8hi __builtin_ia32_vpcomgtw (v8hi, v8hi)
  1433. v16qi __builtin_ia32_vpcomleb (v16qi, v16qi)
  1434. v4si __builtin_ia32_vpcomled (v4si, v4si)
  1435. v2di __builtin_ia32_vpcomleq (v2di, v2di)
  1436. v16qi __builtin_ia32_vpcomleub (v16qi, v16qi)
  1437. v4si __builtin_ia32_vpcomleud (v4si, v4si)
  1438. v2di __builtin_ia32_vpcomleuq (v2di, v2di)
  1439. v8hi __builtin_ia32_vpcomleuw (v8hi, v8hi)
  1440. v8hi __builtin_ia32_vpcomlew (v8hi, v8hi)
  1441. v16qi __builtin_ia32_vpcomltb (v16qi, v16qi)
  1442. v4si __builtin_ia32_vpcomltd (v4si, v4si)
  1443. v2di __builtin_ia32_vpcomltq (v2di, v2di)
  1444. v16qi __builtin_ia32_vpcomltub (v16qi, v16qi)
  1445. v4si __builtin_ia32_vpcomltud (v4si, v4si)
  1446. v2di __builtin_ia32_vpcomltuq (v2di, v2di)
  1447. v8hi __builtin_ia32_vpcomltuw (v8hi, v8hi)
  1448. v8hi __builtin_ia32_vpcomltw (v8hi, v8hi)
  1449. v16qi __builtin_ia32_vpcomneb (v16qi, v16qi)
  1450. v4si __builtin_ia32_vpcomned (v4si, v4si)
  1451. v2di __builtin_ia32_vpcomneq (v2di, v2di)
  1452. v16qi __builtin_ia32_vpcomneub (v16qi, v16qi)
  1453. v4si __builtin_ia32_vpcomneud (v4si, v4si)
  1454. v2di __builtin_ia32_vpcomneuq (v2di, v2di)
  1455. v8hi __builtin_ia32_vpcomneuw (v8hi, v8hi)
  1456. v8hi __builtin_ia32_vpcomnew (v8hi, v8hi)
  1457. v16qi __builtin_ia32_vpcomtrueb (v16qi, v16qi)
  1458. v4si __builtin_ia32_vpcomtrued (v4si, v4si)
  1459. v2di __builtin_ia32_vpcomtrueq (v2di, v2di)
  1460. v16qi __builtin_ia32_vpcomtrueub (v16qi, v16qi)
  1461. v4si __builtin_ia32_vpcomtrueud (v4si, v4si)
  1462. v2di __builtin_ia32_vpcomtrueuq (v2di, v2di)
  1463. v8hi __builtin_ia32_vpcomtrueuw (v8hi, v8hi)
  1464. v8hi __builtin_ia32_vpcomtruew (v8hi, v8hi)
  1465. v4si __builtin_ia32_vphaddbd (v16qi)
  1466. v2di __builtin_ia32_vphaddbq (v16qi)
  1467. v8hi __builtin_ia32_vphaddbw (v16qi)
  1468. v2di __builtin_ia32_vphadddq (v4si)
  1469. v4si __builtin_ia32_vphaddubd (v16qi)
  1470. v2di __builtin_ia32_vphaddubq (v16qi)
  1471. v8hi __builtin_ia32_vphaddubw (v16qi)
  1472. v2di __builtin_ia32_vphaddudq (v4si)
  1473. v4si __builtin_ia32_vphadduwd (v8hi)
  1474. v2di __builtin_ia32_vphadduwq (v8hi)
  1475. v4si __builtin_ia32_vphaddwd (v8hi)
  1476. v2di __builtin_ia32_vphaddwq (v8hi)
  1477. v8hi __builtin_ia32_vphsubbw (v16qi)
  1478. v2di __builtin_ia32_vphsubdq (v4si)
  1479. v4si __builtin_ia32_vphsubwd (v8hi)
  1480. v4si __builtin_ia32_vpmacsdd (v4si, v4si, v4si)
  1481. v2di __builtin_ia32_vpmacsdqh (v4si, v4si, v2di)
  1482. v2di __builtin_ia32_vpmacsdql (v4si, v4si, v2di)
  1483. v4si __builtin_ia32_vpmacssdd (v4si, v4si, v4si)
  1484. v2di __builtin_ia32_vpmacssdqh (v4si, v4si, v2di)
  1485. v2di __builtin_ia32_vpmacssdql (v4si, v4si, v2di)
  1486. v4si __builtin_ia32_vpmacsswd (v8hi, v8hi, v4si)
  1487. v8hi __builtin_ia32_vpmacssww (v8hi, v8hi, v8hi)
  1488. v4si __builtin_ia32_vpmacswd (v8hi, v8hi, v4si)
  1489. v8hi __builtin_ia32_vpmacsww (v8hi, v8hi, v8hi)
  1490. v4si __builtin_ia32_vpmadcsswd (v8hi, v8hi, v4si)
  1491. v4si __builtin_ia32_vpmadcswd (v8hi, v8hi, v4si)
  1492. v16qi __builtin_ia32_vpperm (v16qi, v16qi, v16qi)
  1493. v16qi __builtin_ia32_vprotb (v16qi, v16qi)
  1494. v4si __builtin_ia32_vprotd (v4si, v4si)
  1495. v2di __builtin_ia32_vprotq (v2di, v2di)
  1496. v8hi __builtin_ia32_vprotw (v8hi, v8hi)
  1497. v16qi __builtin_ia32_vpshab (v16qi, v16qi)
  1498. v4si __builtin_ia32_vpshad (v4si, v4si)
  1499. v2di __builtin_ia32_vpshaq (v2di, v2di)
  1500. v8hi __builtin_ia32_vpshaw (v8hi, v8hi)
  1501. v16qi __builtin_ia32_vpshlb (v16qi, v16qi)
  1502. v4si __builtin_ia32_vpshld (v4si, v4si)
  1503. v2di __builtin_ia32_vpshlq (v2di, v2di)
  1504. v8hi __builtin_ia32_vpshlw (v8hi, v8hi)
  1505. </pre></div>
  1506. <p>The following built-in functions are available when <samp>-mfma4</samp> is used.
  1507. All of them generate the machine instruction that is part of the name.
  1508. </p>
  1509. <div class="smallexample">
  1510. <pre class="smallexample">v2df __builtin_ia32_vfmaddpd (v2df, v2df, v2df)
  1511. v4sf __builtin_ia32_vfmaddps (v4sf, v4sf, v4sf)
  1512. v2df __builtin_ia32_vfmaddsd (v2df, v2df, v2df)
  1513. v4sf __builtin_ia32_vfmaddss (v4sf, v4sf, v4sf)
  1514. v2df __builtin_ia32_vfmsubpd (v2df, v2df, v2df)
  1515. v4sf __builtin_ia32_vfmsubps (v4sf, v4sf, v4sf)
  1516. v2df __builtin_ia32_vfmsubsd (v2df, v2df, v2df)
  1517. v4sf __builtin_ia32_vfmsubss (v4sf, v4sf, v4sf)
  1518. v2df __builtin_ia32_vfnmaddpd (v2df, v2df, v2df)
  1519. v4sf __builtin_ia32_vfnmaddps (v4sf, v4sf, v4sf)
  1520. v2df __builtin_ia32_vfnmaddsd (v2df, v2df, v2df)
  1521. v4sf __builtin_ia32_vfnmaddss (v4sf, v4sf, v4sf)
  1522. v2df __builtin_ia32_vfnmsubpd (v2df, v2df, v2df)
  1523. v4sf __builtin_ia32_vfnmsubps (v4sf, v4sf, v4sf)
  1524. v2df __builtin_ia32_vfnmsubsd (v2df, v2df, v2df)
  1525. v4sf __builtin_ia32_vfnmsubss (v4sf, v4sf, v4sf)
  1526. v2df __builtin_ia32_vfmaddsubpd (v2df, v2df, v2df)
  1527. v4sf __builtin_ia32_vfmaddsubps (v4sf, v4sf, v4sf)
  1528. v2df __builtin_ia32_vfmsubaddpd (v2df, v2df, v2df)
  1529. v4sf __builtin_ia32_vfmsubaddps (v4sf, v4sf, v4sf)
  1530. v4df __builtin_ia32_vfmaddpd256 (v4df, v4df, v4df)
  1531. v8sf __builtin_ia32_vfmaddps256 (v8sf, v8sf, v8sf)
  1532. v4df __builtin_ia32_vfmsubpd256 (v4df, v4df, v4df)
  1533. v8sf __builtin_ia32_vfmsubps256 (v8sf, v8sf, v8sf)
  1534. v4df __builtin_ia32_vfnmaddpd256 (v4df, v4df, v4df)
  1535. v8sf __builtin_ia32_vfnmaddps256 (v8sf, v8sf, v8sf)
  1536. v4df __builtin_ia32_vfnmsubpd256 (v4df, v4df, v4df)
  1537. v8sf __builtin_ia32_vfnmsubps256 (v8sf, v8sf, v8sf)
  1538. v4df __builtin_ia32_vfmaddsubpd256 (v4df, v4df, v4df)
  1539. v8sf __builtin_ia32_vfmaddsubps256 (v8sf, v8sf, v8sf)
  1540. v4df __builtin_ia32_vfmsubaddpd256 (v4df, v4df, v4df)
  1541. v8sf __builtin_ia32_vfmsubaddps256 (v8sf, v8sf, v8sf)
  1542. </pre></div>
  1543. <p>The following built-in functions are available when <samp>-mlwp</samp> is used.
  1544. </p>
  1545. <div class="smallexample">
  1546. <pre class="smallexample">void __builtin_ia32_llwpcb16 (void *);
  1547. void __builtin_ia32_llwpcb32 (void *);
  1548. void __builtin_ia32_llwpcb64 (void *);
  1549. void * __builtin_ia32_llwpcb16 (void);
  1550. void * __builtin_ia32_llwpcb32 (void);
  1551. void * __builtin_ia32_llwpcb64 (void);
  1552. void __builtin_ia32_lwpval16 (unsigned short, unsigned int, unsigned short)
  1553. void __builtin_ia32_lwpval32 (unsigned int, unsigned int, unsigned int)
  1554. void __builtin_ia32_lwpval64 (unsigned __int64, unsigned int, unsigned int)
  1555. unsigned char __builtin_ia32_lwpins16 (unsigned short, unsigned int, unsigned short)
  1556. unsigned char __builtin_ia32_lwpins32 (unsigned int, unsigned int, unsigned int)
  1557. unsigned char __builtin_ia32_lwpins64 (unsigned __int64, unsigned int, unsigned int)
  1558. </pre></div>
  1559. <p>The following built-in functions are available when <samp>-mbmi</samp> is used.
  1560. All of them generate the machine instruction that is part of the name.
  1561. </p><div class="smallexample">
  1562. <pre class="smallexample">unsigned int __builtin_ia32_bextr_u32(unsigned int, unsigned int);
  1563. unsigned long long __builtin_ia32_bextr_u64 (unsigned long long, unsigned long long);
  1564. </pre></div>
  1565. <p>The following built-in functions are available when <samp>-mbmi2</samp> is used.
  1566. All of them generate the machine instruction that is part of the name.
  1567. </p><div class="smallexample">
  1568. <pre class="smallexample">unsigned int _bzhi_u32 (unsigned int, unsigned int)
  1569. unsigned int _pdep_u32 (unsigned int, unsigned int)
  1570. unsigned int _pext_u32 (unsigned int, unsigned int)
  1571. unsigned long long _bzhi_u64 (unsigned long long, unsigned long long)
  1572. unsigned long long _pdep_u64 (unsigned long long, unsigned long long)
  1573. unsigned long long _pext_u64 (unsigned long long, unsigned long long)
  1574. </pre></div>
  1575. <p>The following built-in functions are available when <samp>-mlzcnt</samp> is used.
  1576. All of them generate the machine instruction that is part of the name.
  1577. </p><div class="smallexample">
  1578. <pre class="smallexample">unsigned short __builtin_ia32_lzcnt_u16(unsigned short);
  1579. unsigned int __builtin_ia32_lzcnt_u32(unsigned int);
  1580. unsigned long long __builtin_ia32_lzcnt_u64 (unsigned long long);
  1581. </pre></div>
  1582. <p>The following built-in functions are available when <samp>-mfxsr</samp> is used.
  1583. All of them generate the machine instruction that is part of the name.
  1584. </p><div class="smallexample">
  1585. <pre class="smallexample">void __builtin_ia32_fxsave (void *)
  1586. void __builtin_ia32_fxrstor (void *)
  1587. void __builtin_ia32_fxsave64 (void *)
  1588. void __builtin_ia32_fxrstor64 (void *)
  1589. </pre></div>
  1590. <p>The following built-in functions are available when <samp>-mxsave</samp> is used.
  1591. All of them generate the machine instruction that is part of the name.
  1592. </p><div class="smallexample">
  1593. <pre class="smallexample">void __builtin_ia32_xsave (void *, long long)
  1594. void __builtin_ia32_xrstor (void *, long long)
  1595. void __builtin_ia32_xsave64 (void *, long long)
  1596. void __builtin_ia32_xrstor64 (void *, long long)
  1597. </pre></div>
  1598. <p>The following built-in functions are available when <samp>-mxsaveopt</samp> is used.
  1599. All of them generate the machine instruction that is part of the name.
  1600. </p><div class="smallexample">
  1601. <pre class="smallexample">void __builtin_ia32_xsaveopt (void *, long long)
  1602. void __builtin_ia32_xsaveopt64 (void *, long long)
  1603. </pre></div>
  1604. <p>The following built-in functions are available when <samp>-mtbm</samp> is used.
  1605. Both of them generate the immediate form of the bextr machine instruction.
  1606. </p><div class="smallexample">
  1607. <pre class="smallexample">unsigned int __builtin_ia32_bextri_u32 (unsigned int,
  1608. const unsigned int);
  1609. unsigned long long __builtin_ia32_bextri_u64 (unsigned long long,
  1610. const unsigned long long);
  1611. </pre></div>
  1612. <p>The following built-in functions are available when <samp>-m3dnow</samp> is used.
  1613. All of them generate the machine instruction that is part of the name.
  1614. </p>
  1615. <div class="smallexample">
  1616. <pre class="smallexample">void __builtin_ia32_femms (void)
  1617. v8qi __builtin_ia32_pavgusb (v8qi, v8qi)
  1618. v2si __builtin_ia32_pf2id (v2sf)
  1619. v2sf __builtin_ia32_pfacc (v2sf, v2sf)
  1620. v2sf __builtin_ia32_pfadd (v2sf, v2sf)
  1621. v2si __builtin_ia32_pfcmpeq (v2sf, v2sf)
  1622. v2si __builtin_ia32_pfcmpge (v2sf, v2sf)
  1623. v2si __builtin_ia32_pfcmpgt (v2sf, v2sf)
  1624. v2sf __builtin_ia32_pfmax (v2sf, v2sf)
  1625. v2sf __builtin_ia32_pfmin (v2sf, v2sf)
  1626. v2sf __builtin_ia32_pfmul (v2sf, v2sf)
  1627. v2sf __builtin_ia32_pfrcp (v2sf)
  1628. v2sf __builtin_ia32_pfrcpit1 (v2sf, v2sf)
  1629. v2sf __builtin_ia32_pfrcpit2 (v2sf, v2sf)
  1630. v2sf __builtin_ia32_pfrsqrt (v2sf)
  1631. v2sf __builtin_ia32_pfsub (v2sf, v2sf)
  1632. v2sf __builtin_ia32_pfsubr (v2sf, v2sf)
  1633. v2sf __builtin_ia32_pi2fd (v2si)
  1634. v4hi __builtin_ia32_pmulhrw (v4hi, v4hi)
  1635. </pre></div>
  1636. <p>The following built-in functions are available when <samp>-m3dnowa</samp> is used.
  1637. All of them generate the machine instruction that is part of the name.
  1638. </p>
  1639. <div class="smallexample">
  1640. <pre class="smallexample">v2si __builtin_ia32_pf2iw (v2sf)
  1641. v2sf __builtin_ia32_pfnacc (v2sf, v2sf)
  1642. v2sf __builtin_ia32_pfpnacc (v2sf, v2sf)
  1643. v2sf __builtin_ia32_pi2fw (v2si)
  1644. v2sf __builtin_ia32_pswapdsf (v2sf)
  1645. v2si __builtin_ia32_pswapdsi (v2si)
  1646. </pre></div>
  1647. <p>The following built-in functions are available when <samp>-mrtm</samp> is used
  1648. They are used for restricted transactional memory. These are the internal
  1649. low level functions. Normally the functions in
  1650. <a href="x86-transactional-memory-intrinsics.html#x86-transactional-memory-intrinsics">x86 transactional memory intrinsics</a> should be used instead.
  1651. </p>
  1652. <div class="smallexample">
  1653. <pre class="smallexample">int __builtin_ia32_xbegin ()
  1654. void __builtin_ia32_xend ()
  1655. void __builtin_ia32_xabort (status)
  1656. int __builtin_ia32_xtest ()
  1657. </pre></div>
  1658. <p>The following built-in functions are available when <samp>-mmwaitx</samp> is used.
  1659. All of them generate the machine instruction that is part of the name.
  1660. </p><div class="smallexample">
  1661. <pre class="smallexample">void __builtin_ia32_monitorx (void *, unsigned int, unsigned int)
  1662. void __builtin_ia32_mwaitx (unsigned int, unsigned int, unsigned int)
  1663. </pre></div>
  1664. <p>The following built-in functions are available when <samp>-mclzero</samp> is used.
  1665. All of them generate the machine instruction that is part of the name.
  1666. </p><div class="smallexample">
  1667. <pre class="smallexample">void __builtin_i32_clzero (void *)
  1668. </pre></div>
  1669. <p>The following built-in functions are available when <samp>-mpku</samp> is used.
  1670. They generate reads and writes to PKRU.
  1671. </p><div class="smallexample">
  1672. <pre class="smallexample">void __builtin_ia32_wrpkru (unsigned int)
  1673. unsigned int __builtin_ia32_rdpkru ()
  1674. </pre></div>
  1675. <p>The following built-in functions are available when <samp>-mcet</samp> or
  1676. <samp>-mshstk</samp> option is used. They support shadow stack
  1677. machine instructions from Intel Control-flow Enforcement Technology (CET).
  1678. Each built-in function generates the machine instruction that is part
  1679. of the function&rsquo;s name. These are the internal low-level functions.
  1680. Normally the functions in <a href="x86-control_002dflow-protection-intrinsics.html#x86-control_002dflow-protection-intrinsics">x86 control-flow protection intrinsics</a>
  1681. should be used instead.
  1682. </p>
  1683. <div class="smallexample">
  1684. <pre class="smallexample">unsigned int __builtin_ia32_rdsspd (void)
  1685. unsigned long long __builtin_ia32_rdsspq (void)
  1686. void __builtin_ia32_incsspd (unsigned int)
  1687. void __builtin_ia32_incsspq (unsigned long long)
  1688. void __builtin_ia32_saveprevssp(void);
  1689. void __builtin_ia32_rstorssp(void *);
  1690. void __builtin_ia32_wrssd(unsigned int, void *);
  1691. void __builtin_ia32_wrssq(unsigned long long, void *);
  1692. void __builtin_ia32_wrussd(unsigned int, void *);
  1693. void __builtin_ia32_wrussq(unsigned long long, void *);
  1694. void __builtin_ia32_setssbsy(void);
  1695. void __builtin_ia32_clrssbsy(void *);
  1696. </pre></div>
  1697. <hr>
  1698. <div class="header">
  1699. <p>
  1700. Next: <a href="x86-transactional-memory-intrinsics.html#x86-transactional-memory-intrinsics" accesskey="n" rel="next">x86 transactional memory intrinsics</a>, Previous: <a href="TILEPro-Built_002din-Functions.html#TILEPro-Built_002din-Functions" accesskey="p" rel="prev">TILEPro Built-in Functions</a>, Up: <a href="Target-Builtins.html#Target-Builtins" accesskey="u" rel="up">Target Builtins</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  1701. </div>
  1702. </body>
  1703. </html>