Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

960 lines
41KB

  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 Function Attributes (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="x86 Function Attributes (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="x86 Function Attributes (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="Function-Attributes.html#Function-Attributes" rel="up" title="Function Attributes">
  30. <link href="Xstormy16-Function-Attributes.html#Xstormy16-Function-Attributes" rel="next" title="Xstormy16 Function Attributes">
  31. <link href="Visium-Function-Attributes.html#Visium-Function-Attributes" rel="prev" title="Visium Function Attributes">
  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-Function-Attributes"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Xstormy16-Function-Attributes.html#Xstormy16-Function-Attributes" accesskey="n" rel="next">Xstormy16 Function Attributes</a>, Previous: <a href="Visium-Function-Attributes.html#Visium-Function-Attributes" accesskey="p" rel="prev">Visium Function Attributes</a>, Up: <a href="Function-Attributes.html#Function-Attributes" accesskey="u" rel="up">Function Attributes</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-Function-Attributes-1"></a>
  68. <h4 class="subsection">6.33.35 x86 Function Attributes</h4>
  69. <p>These function attributes are supported by the x86 back end:
  70. </p>
  71. <dl compact="compact">
  72. <dt><code>cdecl</code></dt>
  73. <dd><a name="index-cdecl-function-attribute_002c-x86_002d32"></a>
  74. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32"></a>
  75. <a name="index-mrtd-2"></a>
  76. <p>On the x86-32 targets, the <code>cdecl</code> attribute causes the compiler to
  77. assume that the calling function pops off the stack space used to
  78. pass arguments. This is
  79. useful to override the effects of the <samp>-mrtd</samp> switch.
  80. </p>
  81. </dd>
  82. <dt><code>fastcall</code></dt>
  83. <dd><a name="index-fastcall-function-attribute_002c-x86_002d32"></a>
  84. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-1"></a>
  85. <p>On x86-32 targets, the <code>fastcall</code> attribute causes the compiler to
  86. pass the first argument (if of integral type) in the register ECX and
  87. the second argument (if of integral type) in the register EDX. Subsequent
  88. and other typed arguments are passed on the stack. The called function
  89. pops the arguments off the stack. If the number of arguments is variable all
  90. arguments are pushed on the stack.
  91. </p>
  92. </dd>
  93. <dt><code>thiscall</code></dt>
  94. <dd><a name="index-thiscall-function-attribute_002c-x86_002d32"></a>
  95. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-2"></a>
  96. <p>On x86-32 targets, the <code>thiscall</code> attribute causes the compiler to
  97. pass the first argument (if of integral type) in the register ECX.
  98. Subsequent and other typed arguments are passed on the stack. The called
  99. function pops the arguments off the stack.
  100. If the number of arguments is variable all arguments are pushed on the
  101. stack.
  102. The <code>thiscall</code> attribute is intended for C++ non-static member functions.
  103. As a GCC extension, this calling convention can be used for C functions
  104. and for static member methods.
  105. </p>
  106. </dd>
  107. <dt><code>ms_abi</code></dt>
  108. <dt><code>sysv_abi</code></dt>
  109. <dd><a name="index-ms_005fabi-function-attribute_002c-x86"></a>
  110. <a name="index-sysv_005fabi-function-attribute_002c-x86"></a>
  111. <p>On 32-bit and 64-bit x86 targets, you can use an ABI attribute
  112. to indicate which calling convention should be used for a function. The
  113. <code>ms_abi</code> attribute tells the compiler to use the Microsoft ABI,
  114. while the <code>sysv_abi</code> attribute tells the compiler to use the ABI
  115. used on GNU/Linux and other systems. The default is to use the Microsoft ABI
  116. when targeting Windows. On all other systems, the default is the x86/AMD ABI.
  117. </p>
  118. <p>Note, the <code>ms_abi</code> attribute for Microsoft Windows 64-bit targets currently
  119. requires the <samp>-maccumulate-outgoing-args</samp> option.
  120. </p>
  121. </dd>
  122. <dt><code>callee_pop_aggregate_return (<var>number</var>)</code></dt>
  123. <dd><a name="index-callee_005fpop_005faggregate_005freturn-function-attribute_002c-x86"></a>
  124. <p>On x86-32 targets, you can use this attribute to control how
  125. aggregates are returned in memory. If the caller is responsible for
  126. popping the hidden pointer together with the rest of the arguments, specify
  127. <var>number</var> equal to zero. If callee is responsible for popping the
  128. hidden pointer, specify <var>number</var> equal to one.
  129. </p>
  130. <p>The default x86-32 ABI assumes that the callee pops the
  131. stack for hidden pointer. However, on x86-32 Microsoft Windows targets,
  132. the compiler assumes that the
  133. caller pops the stack for hidden pointer.
  134. </p>
  135. </dd>
  136. <dt><code>ms_hook_prologue</code></dt>
  137. <dd><a name="index-ms_005fhook_005fprologue-function-attribute_002c-x86"></a>
  138. <p>On 32-bit and 64-bit x86 targets, you can use
  139. this function attribute to make GCC generate the &ldquo;hot-patching&rdquo; function
  140. prologue used in Win32 API functions in Microsoft Windows XP Service Pack 2
  141. and newer.
  142. </p>
  143. </dd>
  144. <dt><code>naked</code></dt>
  145. <dd><a name="index-naked-function-attribute_002c-x86"></a>
  146. <p>This attribute allows the compiler to construct the
  147. requisite function declaration, while allowing the body of the
  148. function to be assembly code. The specified function will not have
  149. prologue/epilogue sequences generated by the compiler. Only basic
  150. <code>asm</code> statements can safely be included in naked functions
  151. (see <a href="Basic-Asm.html#Basic-Asm">Basic Asm</a>). While using extended <code>asm</code> or a mixture of
  152. basic <code>asm</code> and C code may appear to work, they cannot be
  153. depended upon to work reliably and are not supported.
  154. </p>
  155. </dd>
  156. <dt><code>regparm (<var>number</var>)</code></dt>
  157. <dd><a name="index-regparm-function-attribute_002c-x86"></a>
  158. <a name="index-functions-that-are-passed-arguments-in-registers-on-x86_002d32"></a>
  159. <p>On x86-32 targets, the <code>regparm</code> attribute causes the compiler to
  160. pass arguments number one to <var>number</var> if they are of integral type
  161. in registers EAX, EDX, and ECX instead of on the stack. Functions that
  162. take a variable number of arguments continue to be passed all of their
  163. arguments on the stack.
  164. </p>
  165. <p>Beware that on some ELF systems this attribute is unsuitable for
  166. global functions in shared libraries with lazy binding (which is the
  167. default). Lazy binding sends the first call via resolving code in
  168. the loader, which might assume EAX, EDX and ECX can be clobbered, as
  169. per the standard calling conventions. Solaris 8 is affected by this.
  170. Systems with the GNU C Library version 2.1 or higher
  171. and FreeBSD are believed to be
  172. safe since the loaders there save EAX, EDX and ECX. (Lazy binding can be
  173. disabled with the linker or the loader if desired, to avoid the
  174. problem.)
  175. </p>
  176. </dd>
  177. <dt><code>sseregparm</code></dt>
  178. <dd><a name="index-sseregparm-function-attribute_002c-x86"></a>
  179. <p>On x86-32 targets with SSE support, the <code>sseregparm</code> attribute
  180. causes the compiler to pass up to 3 floating-point arguments in
  181. SSE registers instead of on the stack. Functions that take a
  182. variable number of arguments continue to pass all of their
  183. floating-point arguments on the stack.
  184. </p>
  185. </dd>
  186. <dt><code>force_align_arg_pointer</code></dt>
  187. <dd><a name="index-force_005falign_005farg_005fpointer-function-attribute_002c-x86"></a>
  188. <p>On x86 targets, the <code>force_align_arg_pointer</code> attribute may be
  189. applied to individual function definitions, generating an alternate
  190. prologue and epilogue that realigns the run-time stack if necessary.
  191. This supports mixing legacy codes that run with a 4-byte aligned stack
  192. with modern codes that keep a 16-byte stack for SSE compatibility.
  193. </p>
  194. </dd>
  195. <dt><code>stdcall</code></dt>
  196. <dd><a name="index-stdcall-function-attribute_002c-x86_002d32"></a>
  197. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-3"></a>
  198. <p>On x86-32 targets, the <code>stdcall</code> attribute causes the compiler to
  199. assume that the called function pops off the stack space used to
  200. pass arguments, unless it takes a variable number of arguments.
  201. </p>
  202. </dd>
  203. <dt><code>no_caller_saved_registers</code></dt>
  204. <dd><a name="index-no_005fcaller_005fsaved_005fregisters-function-attribute_002c-x86"></a>
  205. <p>Use this attribute to indicate that the specified function has no
  206. caller-saved registers. That is, all registers are callee-saved. For
  207. example, this attribute can be used for a function called from an
  208. interrupt handler. The compiler generates proper function entry and
  209. exit sequences to save and restore any modified registers, except for
  210. the EFLAGS register. Since GCC doesn&rsquo;t preserve SSE, MMX nor x87
  211. states, the GCC option <samp>-mgeneral-regs-only</samp> should be used to
  212. compile functions with <code>no_caller_saved_registers</code> attribute.
  213. </p>
  214. </dd>
  215. <dt><code>interrupt</code></dt>
  216. <dd><a name="index-interrupt-function-attribute_002c-x86"></a>
  217. <p>Use this attribute to indicate that the specified function is an
  218. interrupt handler or an exception handler (depending on parameters passed
  219. to the function, explained further). The compiler generates function
  220. entry and exit sequences suitable for use in an interrupt handler when
  221. this attribute is present. The <code>IRET</code> instruction, instead of the
  222. <code>RET</code> instruction, is used to return from interrupt handlers. All
  223. registers, except for the EFLAGS register which is restored by the
  224. <code>IRET</code> instruction, are preserved by the compiler. Since GCC
  225. doesn&rsquo;t preserve SSE, MMX nor x87 states, the GCC option
  226. <samp>-mgeneral-regs-only</samp> should be used to compile interrupt and
  227. exception handlers.
  228. </p>
  229. <p>Any interruptible-without-stack-switch code must be compiled with
  230. <samp>-mno-red-zone</samp> since interrupt handlers can and will, because
  231. of the hardware design, touch the red zone.
  232. </p>
  233. <p>An interrupt handler must be declared with a mandatory pointer
  234. argument:
  235. </p>
  236. <div class="smallexample">
  237. <pre class="smallexample">struct interrupt_frame;
  238. __attribute__ ((interrupt))
  239. void
  240. f (struct interrupt_frame *frame)
  241. {
  242. }
  243. </pre></div>
  244. <p>and you must define <code>struct interrupt_frame</code> as described in the
  245. processor&rsquo;s manual.
  246. </p>
  247. <p>Exception handlers differ from interrupt handlers because the system
  248. pushes an error code on the stack. An exception handler declaration is
  249. similar to that for an interrupt handler, but with a different mandatory
  250. function signature. The compiler arranges to pop the error code off the
  251. stack before the <code>IRET</code> instruction.
  252. </p>
  253. <div class="smallexample">
  254. <pre class="smallexample">#ifdef __x86_64__
  255. typedef unsigned long long int uword_t;
  256. #else
  257. typedef unsigned int uword_t;
  258. #endif
  259. struct interrupt_frame;
  260. __attribute__ ((interrupt))
  261. void
  262. f (struct interrupt_frame *frame, uword_t error_code)
  263. {
  264. ...
  265. }
  266. </pre></div>
  267. <p>Exception handlers should only be used for exceptions that push an error
  268. code; you should use an interrupt handler in other cases. The system
  269. will crash if the wrong kind of handler is used.
  270. </p>
  271. </dd>
  272. <dt><code>target (<var>options</var>)</code></dt>
  273. <dd><a name="index-target-function-attribute-5"></a>
  274. <p>As discussed in <a href="Common-Function-Attributes.html#Common-Function-Attributes">Common Function Attributes</a>, this attribute
  275. allows specification of target-specific compilation options.
  276. </p>
  277. <p>On the x86, the following options are allowed:
  278. </p><dl compact="compact">
  279. <dt>&lsquo;<samp>3dnow</samp>&rsquo;</dt>
  280. <dt>&lsquo;<samp>no-3dnow</samp>&rsquo;</dt>
  281. <dd><a name="index-target_0028_00223dnow_0022_0029-function-attribute_002c-x86"></a>
  282. <p>Enable/disable the generation of the 3DNow! instructions.
  283. </p>
  284. </dd>
  285. <dt>&lsquo;<samp>3dnowa</samp>&rsquo;</dt>
  286. <dt>&lsquo;<samp>no-3dnowa</samp>&rsquo;</dt>
  287. <dd><a name="index-target_0028_00223dnowa_0022_0029-function-attribute_002c-x86"></a>
  288. <p>Enable/disable the generation of the enhanced 3DNow! instructions.
  289. </p>
  290. </dd>
  291. <dt>&lsquo;<samp>abm</samp>&rsquo;</dt>
  292. <dt>&lsquo;<samp>no-abm</samp>&rsquo;</dt>
  293. <dd><a name="index-target_0028_0022abm_0022_0029-function-attribute_002c-x86"></a>
  294. <p>Enable/disable the generation of the advanced bit instructions.
  295. </p>
  296. </dd>
  297. <dt>&lsquo;<samp>adx</samp>&rsquo;</dt>
  298. <dt>&lsquo;<samp>no-adx</samp>&rsquo;</dt>
  299. <dd><a name="index-target_0028_0022adx_0022_0029-function-attribute_002c-x86"></a>
  300. <p>Enable/disable the generation of the ADX instructions.
  301. </p>
  302. </dd>
  303. <dt>&lsquo;<samp>aes</samp>&rsquo;</dt>
  304. <dt>&lsquo;<samp>no-aes</samp>&rsquo;</dt>
  305. <dd><a name="index-target_0028_0022aes_0022_0029-function-attribute_002c-x86"></a>
  306. <p>Enable/disable the generation of the AES instructions.
  307. </p>
  308. </dd>
  309. <dt>&lsquo;<samp>avx</samp>&rsquo;</dt>
  310. <dt>&lsquo;<samp>no-avx</samp>&rsquo;</dt>
  311. <dd><a name="index-target_0028_0022avx_0022_0029-function-attribute_002c-x86"></a>
  312. <p>Enable/disable the generation of the AVX instructions.
  313. </p>
  314. </dd>
  315. <dt>&lsquo;<samp>avx2</samp>&rsquo;</dt>
  316. <dt>&lsquo;<samp>no-avx2</samp>&rsquo;</dt>
  317. <dd><a name="index-target_0028_0022avx2_0022_0029-function-attribute_002c-x86"></a>
  318. <p>Enable/disable the generation of the AVX2 instructions.
  319. </p>
  320. </dd>
  321. <dt>&lsquo;<samp>avx5124fmaps</samp>&rsquo;</dt>
  322. <dt>&lsquo;<samp>no-avx5124fmaps</samp>&rsquo;</dt>
  323. <dd><a name="index-target_0028_0022avx5124fmaps_0022_0029-function-attribute_002c-x86"></a>
  324. <p>Enable/disable the generation of the AVX5124FMAPS instructions.
  325. </p>
  326. </dd>
  327. <dt>&lsquo;<samp>avx5124vnniw</samp>&rsquo;</dt>
  328. <dt>&lsquo;<samp>no-avx5124vnniw</samp>&rsquo;</dt>
  329. <dd><a name="index-target_0028_0022avx5124vnniw_0022_0029-function-attribute_002c-x86"></a>
  330. <p>Enable/disable the generation of the AVX5124VNNIW instructions.
  331. </p>
  332. </dd>
  333. <dt>&lsquo;<samp>avx512bitalg</samp>&rsquo;</dt>
  334. <dt>&lsquo;<samp>no-avx512bitalg</samp>&rsquo;</dt>
  335. <dd><a name="index-target_0028_0022avx512bitalg_0022_0029-function-attribute_002c-x86"></a>
  336. <p>Enable/disable the generation of the AVX512BITALG instructions.
  337. </p>
  338. </dd>
  339. <dt>&lsquo;<samp>avx512bw</samp>&rsquo;</dt>
  340. <dt>&lsquo;<samp>no-avx512bw</samp>&rsquo;</dt>
  341. <dd><a name="index-target_0028_0022avx512bw_0022_0029-function-attribute_002c-x86"></a>
  342. <p>Enable/disable the generation of the AVX512BW instructions.
  343. </p>
  344. </dd>
  345. <dt>&lsquo;<samp>avx512cd</samp>&rsquo;</dt>
  346. <dt>&lsquo;<samp>no-avx512cd</samp>&rsquo;</dt>
  347. <dd><a name="index-target_0028_0022avx512cd_0022_0029-function-attribute_002c-x86"></a>
  348. <p>Enable/disable the generation of the AVX512CD instructions.
  349. </p>
  350. </dd>
  351. <dt>&lsquo;<samp>avx512dq</samp>&rsquo;</dt>
  352. <dt>&lsquo;<samp>no-avx512dq</samp>&rsquo;</dt>
  353. <dd><a name="index-target_0028_0022avx512dq_0022_0029-function-attribute_002c-x86"></a>
  354. <p>Enable/disable the generation of the AVX512DQ instructions.
  355. </p>
  356. </dd>
  357. <dt>&lsquo;<samp>avx512er</samp>&rsquo;</dt>
  358. <dt>&lsquo;<samp>no-avx512er</samp>&rsquo;</dt>
  359. <dd><a name="index-target_0028_0022avx512er_0022_0029-function-attribute_002c-x86"></a>
  360. <p>Enable/disable the generation of the AVX512ER instructions.
  361. </p>
  362. </dd>
  363. <dt>&lsquo;<samp>avx512f</samp>&rsquo;</dt>
  364. <dt>&lsquo;<samp>no-avx512f</samp>&rsquo;</dt>
  365. <dd><a name="index-target_0028_0022avx512f_0022_0029-function-attribute_002c-x86"></a>
  366. <p>Enable/disable the generation of the AVX512F instructions.
  367. </p>
  368. </dd>
  369. <dt>&lsquo;<samp>avx512ifma</samp>&rsquo;</dt>
  370. <dt>&lsquo;<samp>no-avx512ifma</samp>&rsquo;</dt>
  371. <dd><a name="index-target_0028_0022avx512ifma_0022_0029-function-attribute_002c-x86"></a>
  372. <p>Enable/disable the generation of the AVX512IFMA instructions.
  373. </p>
  374. </dd>
  375. <dt>&lsquo;<samp>avx512pf</samp>&rsquo;</dt>
  376. <dt>&lsquo;<samp>no-avx512pf</samp>&rsquo;</dt>
  377. <dd><a name="index-target_0028_0022avx512pf_0022_0029-function-attribute_002c-x86"></a>
  378. <p>Enable/disable the generation of the AVX512PF instructions.
  379. </p>
  380. </dd>
  381. <dt>&lsquo;<samp>avx512vbmi</samp>&rsquo;</dt>
  382. <dt>&lsquo;<samp>no-avx512vbmi</samp>&rsquo;</dt>
  383. <dd><a name="index-target_0028_0022avx512vbmi_0022_0029-function-attribute_002c-x86"></a>
  384. <p>Enable/disable the generation of the AVX512VBMI instructions.
  385. </p>
  386. </dd>
  387. <dt>&lsquo;<samp>avx512vbmi2</samp>&rsquo;</dt>
  388. <dt>&lsquo;<samp>no-avx512vbmi2</samp>&rsquo;</dt>
  389. <dd><a name="index-target_0028_0022avx512vbmi2_0022_0029-function-attribute_002c-x86"></a>
  390. <p>Enable/disable the generation of the AVX512VBMI2 instructions.
  391. </p>
  392. </dd>
  393. <dt>&lsquo;<samp>avx512vl</samp>&rsquo;</dt>
  394. <dt>&lsquo;<samp>no-avx512vl</samp>&rsquo;</dt>
  395. <dd><a name="index-target_0028_0022avx512vl_0022_0029-function-attribute_002c-x86"></a>
  396. <p>Enable/disable the generation of the AVX512VL instructions.
  397. </p>
  398. </dd>
  399. <dt>&lsquo;<samp>avx512vnni</samp>&rsquo;</dt>
  400. <dt>&lsquo;<samp>no-avx512vnni</samp>&rsquo;</dt>
  401. <dd><a name="index-target_0028_0022avx512vnni_0022_0029-function-attribute_002c-x86"></a>
  402. <p>Enable/disable the generation of the AVX512VNNI instructions.
  403. </p>
  404. </dd>
  405. <dt>&lsquo;<samp>avx512vpopcntdq</samp>&rsquo;</dt>
  406. <dt>&lsquo;<samp>no-avx512vpopcntdq</samp>&rsquo;</dt>
  407. <dd><a name="index-target_0028_0022avx512vpopcntdq_0022_0029-function-attribute_002c-x86"></a>
  408. <p>Enable/disable the generation of the AVX512VPOPCNTDQ instructions.
  409. </p>
  410. </dd>
  411. <dt>&lsquo;<samp>bmi</samp>&rsquo;</dt>
  412. <dt>&lsquo;<samp>no-bmi</samp>&rsquo;</dt>
  413. <dd><a name="index-target_0028_0022bmi_0022_0029-function-attribute_002c-x86"></a>
  414. <p>Enable/disable the generation of the BMI instructions.
  415. </p>
  416. </dd>
  417. <dt>&lsquo;<samp>bmi2</samp>&rsquo;</dt>
  418. <dt>&lsquo;<samp>no-bmi2</samp>&rsquo;</dt>
  419. <dd><a name="index-target_0028_0022bmi2_0022_0029-function-attribute_002c-x86"></a>
  420. <p>Enable/disable the generation of the BMI2 instructions.
  421. </p>
  422. </dd>
  423. <dt>&lsquo;<samp>cldemote</samp>&rsquo;</dt>
  424. <dt>&lsquo;<samp>no-cldemote</samp>&rsquo;</dt>
  425. <dd><a name="index-target_0028_0022cldemote_0022_0029-function-attribute_002c-x86"></a>
  426. <p>Enable/disable the generation of the CLDEMOTE instructions.
  427. </p>
  428. </dd>
  429. <dt>&lsquo;<samp>clflushopt</samp>&rsquo;</dt>
  430. <dt>&lsquo;<samp>no-clflushopt</samp>&rsquo;</dt>
  431. <dd><a name="index-target_0028_0022clflushopt_0022_0029-function-attribute_002c-x86"></a>
  432. <p>Enable/disable the generation of the CLFLUSHOPT instructions.
  433. </p>
  434. </dd>
  435. <dt>&lsquo;<samp>clwb</samp>&rsquo;</dt>
  436. <dt>&lsquo;<samp>no-clwb</samp>&rsquo;</dt>
  437. <dd><a name="index-target_0028_0022clwb_0022_0029-function-attribute_002c-x86"></a>
  438. <p>Enable/disable the generation of the CLWB instructions.
  439. </p>
  440. </dd>
  441. <dt>&lsquo;<samp>clzero</samp>&rsquo;</dt>
  442. <dt>&lsquo;<samp>no-clzero</samp>&rsquo;</dt>
  443. <dd><a name="index-target_0028_0022clzero_0022_0029-function-attribute_002c-x86"></a>
  444. <p>Enable/disable the generation of the CLZERO instructions.
  445. </p>
  446. </dd>
  447. <dt>&lsquo;<samp>crc32</samp>&rsquo;</dt>
  448. <dt>&lsquo;<samp>no-crc32</samp>&rsquo;</dt>
  449. <dd><a name="index-target_0028_0022crc32_0022_0029-function-attribute_002c-x86"></a>
  450. <p>Enable/disable the generation of the CRC32 instructions.
  451. </p>
  452. </dd>
  453. <dt>&lsquo;<samp>cx16</samp>&rsquo;</dt>
  454. <dt>&lsquo;<samp>no-cx16</samp>&rsquo;</dt>
  455. <dd><a name="index-target_0028_0022cx16_0022_0029-function-attribute_002c-x86"></a>
  456. <p>Enable/disable the generation of the CMPXCHG16B instructions.
  457. </p>
  458. </dd>
  459. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  460. <dd><a name="index-target_0028_0022default_0022_0029-function-attribute_002c-x86"></a>
  461. <p>See <a href="Function-Multiversioning.html#Function-Multiversioning">Function Multiversioning</a>, where it is used to specify the
  462. default function version.
  463. </p>
  464. </dd>
  465. <dt>&lsquo;<samp>f16c</samp>&rsquo;</dt>
  466. <dt>&lsquo;<samp>no-f16c</samp>&rsquo;</dt>
  467. <dd><a name="index-target_0028_0022f16c_0022_0029-function-attribute_002c-x86"></a>
  468. <p>Enable/disable the generation of the F16C instructions.
  469. </p>
  470. </dd>
  471. <dt>&lsquo;<samp>fma</samp>&rsquo;</dt>
  472. <dt>&lsquo;<samp>no-fma</samp>&rsquo;</dt>
  473. <dd><a name="index-target_0028_0022fma_0022_0029-function-attribute_002c-x86"></a>
  474. <p>Enable/disable the generation of the FMA instructions.
  475. </p>
  476. </dd>
  477. <dt>&lsquo;<samp>fma4</samp>&rsquo;</dt>
  478. <dt>&lsquo;<samp>no-fma4</samp>&rsquo;</dt>
  479. <dd><a name="index-target_0028_0022fma4_0022_0029-function-attribute_002c-x86"></a>
  480. <p>Enable/disable the generation of the FMA4 instructions.
  481. </p>
  482. </dd>
  483. <dt>&lsquo;<samp>fsgsbase</samp>&rsquo;</dt>
  484. <dt>&lsquo;<samp>no-fsgsbase</samp>&rsquo;</dt>
  485. <dd><a name="index-target_0028_0022fsgsbase_0022_0029-function-attribute_002c-x86"></a>
  486. <p>Enable/disable the generation of the FSGSBASE instructions.
  487. </p>
  488. </dd>
  489. <dt>&lsquo;<samp>fxsr</samp>&rsquo;</dt>
  490. <dt>&lsquo;<samp>no-fxsr</samp>&rsquo;</dt>
  491. <dd><a name="index-target_0028_0022fxsr_0022_0029-function-attribute_002c-x86"></a>
  492. <p>Enable/disable the generation of the FXSR instructions.
  493. </p>
  494. </dd>
  495. <dt>&lsquo;<samp>gfni</samp>&rsquo;</dt>
  496. <dt>&lsquo;<samp>no-gfni</samp>&rsquo;</dt>
  497. <dd><a name="index-target_0028_0022gfni_0022_0029-function-attribute_002c-x86"></a>
  498. <p>Enable/disable the generation of the GFNI instructions.
  499. </p>
  500. </dd>
  501. <dt>&lsquo;<samp>hle</samp>&rsquo;</dt>
  502. <dt>&lsquo;<samp>no-hle</samp>&rsquo;</dt>
  503. <dd><a name="index-target_0028_0022hle_0022_0029-function-attribute_002c-x86"></a>
  504. <p>Enable/disable the generation of the HLE instruction prefixes.
  505. </p>
  506. </dd>
  507. <dt>&lsquo;<samp>lwp</samp>&rsquo;</dt>
  508. <dt>&lsquo;<samp>no-lwp</samp>&rsquo;</dt>
  509. <dd><a name="index-target_0028_0022lwp_0022_0029-function-attribute_002c-x86"></a>
  510. <p>Enable/disable the generation of the LWP instructions.
  511. </p>
  512. </dd>
  513. <dt>&lsquo;<samp>lzcnt</samp>&rsquo;</dt>
  514. <dt>&lsquo;<samp>no-lzcnt</samp>&rsquo;</dt>
  515. <dd><a name="index-target_0028_0022lzcnt_0022_0029-function-attribute_002c-x86"></a>
  516. <p>Enable/disable the generation of the LZCNT instructions.
  517. </p>
  518. </dd>
  519. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  520. <dt>&lsquo;<samp>no-mmx</samp>&rsquo;</dt>
  521. <dd><a name="index-target_0028_0022mmx_0022_0029-function-attribute_002c-x86"></a>
  522. <p>Enable/disable the generation of the MMX instructions.
  523. </p>
  524. </dd>
  525. <dt>&lsquo;<samp>movbe</samp>&rsquo;</dt>
  526. <dt>&lsquo;<samp>no-movbe</samp>&rsquo;</dt>
  527. <dd><a name="index-target_0028_0022movbe_0022_0029-function-attribute_002c-x86"></a>
  528. <p>Enable/disable the generation of the MOVBE instructions.
  529. </p>
  530. </dd>
  531. <dt>&lsquo;<samp>movdir64b</samp>&rsquo;</dt>
  532. <dt>&lsquo;<samp>no-movdir64b</samp>&rsquo;</dt>
  533. <dd><a name="index-target_0028_0022movdir64b_0022_0029-function-attribute_002c-x86"></a>
  534. <p>Enable/disable the generation of the MOVDIR64B instructions.
  535. </p>
  536. </dd>
  537. <dt>&lsquo;<samp>movdiri</samp>&rsquo;</dt>
  538. <dt>&lsquo;<samp>no-movdiri</samp>&rsquo;</dt>
  539. <dd><a name="index-target_0028_0022movdiri_0022_0029-function-attribute_002c-x86"></a>
  540. <p>Enable/disable the generation of the MOVDIRI instructions.
  541. </p>
  542. </dd>
  543. <dt>&lsquo;<samp>mwaitx</samp>&rsquo;</dt>
  544. <dt>&lsquo;<samp>no-mwaitx</samp>&rsquo;</dt>
  545. <dd><a name="index-target_0028_0022mwaitx_0022_0029-function-attribute_002c-x86"></a>
  546. <p>Enable/disable the generation of the MWAITX instructions.
  547. </p>
  548. </dd>
  549. <dt>&lsquo;<samp>pclmul</samp>&rsquo;</dt>
  550. <dt>&lsquo;<samp>no-pclmul</samp>&rsquo;</dt>
  551. <dd><a name="index-target_0028_0022pclmul_0022_0029-function-attribute_002c-x86"></a>
  552. <p>Enable/disable the generation of the PCLMUL instructions.
  553. </p>
  554. </dd>
  555. <dt>&lsquo;<samp>pconfig</samp>&rsquo;</dt>
  556. <dt>&lsquo;<samp>no-pconfig</samp>&rsquo;</dt>
  557. <dd><a name="index-target_0028_0022pconfig_0022_0029-function-attribute_002c-x86"></a>
  558. <p>Enable/disable the generation of the PCONFIG instructions.
  559. </p>
  560. </dd>
  561. <dt>&lsquo;<samp>pku</samp>&rsquo;</dt>
  562. <dt>&lsquo;<samp>no-pku</samp>&rsquo;</dt>
  563. <dd><a name="index-target_0028_0022pku_0022_0029-function-attribute_002c-x86"></a>
  564. <p>Enable/disable the generation of the PKU instructions.
  565. </p>
  566. </dd>
  567. <dt>&lsquo;<samp>popcnt</samp>&rsquo;</dt>
  568. <dt>&lsquo;<samp>no-popcnt</samp>&rsquo;</dt>
  569. <dd><a name="index-target_0028_0022popcnt_0022_0029-function-attribute_002c-x86"></a>
  570. <p>Enable/disable the generation of the POPCNT instruction.
  571. </p>
  572. </dd>
  573. <dt>&lsquo;<samp>prefetchwt1</samp>&rsquo;</dt>
  574. <dt>&lsquo;<samp>no-prefetchwt1</samp>&rsquo;</dt>
  575. <dd><a name="index-target_0028_0022prefetchwt1_0022_0029-function-attribute_002c-x86"></a>
  576. <p>Enable/disable the generation of the PREFETCHWT1 instructions.
  577. </p>
  578. </dd>
  579. <dt>&lsquo;<samp>prfchw</samp>&rsquo;</dt>
  580. <dt>&lsquo;<samp>no-prfchw</samp>&rsquo;</dt>
  581. <dd><a name="index-target_0028_0022prfchw_0022_0029-function-attribute_002c-x86"></a>
  582. <p>Enable/disable the generation of the PREFETCHW instruction.
  583. </p>
  584. </dd>
  585. <dt>&lsquo;<samp>ptwrite</samp>&rsquo;</dt>
  586. <dt>&lsquo;<samp>no-ptwrite</samp>&rsquo;</dt>
  587. <dd><a name="index-target_0028_0022ptwrite_0022_0029-function-attribute_002c-x86"></a>
  588. <p>Enable/disable the generation of the PTWRITE instructions.
  589. </p>
  590. </dd>
  591. <dt>&lsquo;<samp>rdpid</samp>&rsquo;</dt>
  592. <dt>&lsquo;<samp>no-rdpid</samp>&rsquo;</dt>
  593. <dd><a name="index-target_0028_0022rdpid_0022_0029-function-attribute_002c-x86"></a>
  594. <p>Enable/disable the generation of the RDPID instructions.
  595. </p>
  596. </dd>
  597. <dt>&lsquo;<samp>rdrnd</samp>&rsquo;</dt>
  598. <dt>&lsquo;<samp>no-rdrnd</samp>&rsquo;</dt>
  599. <dd><a name="index-target_0028_0022rdrnd_0022_0029-function-attribute_002c-x86"></a>
  600. <p>Enable/disable the generation of the RDRND instructions.
  601. </p>
  602. </dd>
  603. <dt>&lsquo;<samp>rdseed</samp>&rsquo;</dt>
  604. <dt>&lsquo;<samp>no-rdseed</samp>&rsquo;</dt>
  605. <dd><a name="index-target_0028_0022rdseed_0022_0029-function-attribute_002c-x86"></a>
  606. <p>Enable/disable the generation of the RDSEED instructions.
  607. </p>
  608. </dd>
  609. <dt>&lsquo;<samp>rtm</samp>&rsquo;</dt>
  610. <dt>&lsquo;<samp>no-rtm</samp>&rsquo;</dt>
  611. <dd><a name="index-target_0028_0022rtm_0022_0029-function-attribute_002c-x86"></a>
  612. <p>Enable/disable the generation of the RTM instructions.
  613. </p>
  614. </dd>
  615. <dt>&lsquo;<samp>sahf</samp>&rsquo;</dt>
  616. <dt>&lsquo;<samp>no-sahf</samp>&rsquo;</dt>
  617. <dd><a name="index-target_0028_0022sahf_0022_0029-function-attribute_002c-x86"></a>
  618. <p>Enable/disable the generation of the SAHF instructions.
  619. </p>
  620. </dd>
  621. <dt>&lsquo;<samp>sgx</samp>&rsquo;</dt>
  622. <dt>&lsquo;<samp>no-sgx</samp>&rsquo;</dt>
  623. <dd><a name="index-target_0028_0022sgx_0022_0029-function-attribute_002c-x86"></a>
  624. <p>Enable/disable the generation of the SGX instructions.
  625. </p>
  626. </dd>
  627. <dt>&lsquo;<samp>sha</samp>&rsquo;</dt>
  628. <dt>&lsquo;<samp>no-sha</samp>&rsquo;</dt>
  629. <dd><a name="index-target_0028_0022sha_0022_0029-function-attribute_002c-x86"></a>
  630. <p>Enable/disable the generation of the SHA instructions.
  631. </p>
  632. </dd>
  633. <dt>&lsquo;<samp>shstk</samp>&rsquo;</dt>
  634. <dt>&lsquo;<samp>no-shstk</samp>&rsquo;</dt>
  635. <dd><a name="index-target_0028_0022shstk_0022_0029-function-attribute_002c-x86"></a>
  636. <p>Enable/disable the shadow stack built-in functions from CET.
  637. </p>
  638. </dd>
  639. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  640. <dt>&lsquo;<samp>no-sse</samp>&rsquo;</dt>
  641. <dd><a name="index-target_0028_0022sse_0022_0029-function-attribute_002c-x86"></a>
  642. <p>Enable/disable the generation of the SSE instructions.
  643. </p>
  644. </dd>
  645. <dt>&lsquo;<samp>sse2</samp>&rsquo;</dt>
  646. <dt>&lsquo;<samp>no-sse2</samp>&rsquo;</dt>
  647. <dd><a name="index-target_0028_0022sse2_0022_0029-function-attribute_002c-x86"></a>
  648. <p>Enable/disable the generation of the SSE2 instructions.
  649. </p>
  650. </dd>
  651. <dt>&lsquo;<samp>sse3</samp>&rsquo;</dt>
  652. <dt>&lsquo;<samp>no-sse3</samp>&rsquo;</dt>
  653. <dd><a name="index-target_0028_0022sse3_0022_0029-function-attribute_002c-x86"></a>
  654. <p>Enable/disable the generation of the SSE3 instructions.
  655. </p>
  656. </dd>
  657. <dt>&lsquo;<samp>sse4</samp>&rsquo;</dt>
  658. <dt>&lsquo;<samp>no-sse4</samp>&rsquo;</dt>
  659. <dd><a name="index-target_0028_0022sse4_0022_0029-function-attribute_002c-x86"></a>
  660. <p>Enable/disable the generation of the SSE4 instructions (both SSE4.1
  661. and SSE4.2).
  662. </p>
  663. </dd>
  664. <dt>&lsquo;<samp>sse4.1</samp>&rsquo;</dt>
  665. <dt>&lsquo;<samp>no-sse4.1</samp>&rsquo;</dt>
  666. <dd><a name="index-target_0028_0022sse4_002e1_0022_0029-function-attribute_002c-x86"></a>
  667. <p>Enable/disable the generation of the sse4.1 instructions.
  668. </p>
  669. </dd>
  670. <dt>&lsquo;<samp>sse4.2</samp>&rsquo;</dt>
  671. <dt>&lsquo;<samp>no-sse4.2</samp>&rsquo;</dt>
  672. <dd><a name="index-target_0028_0022sse4_002e2_0022_0029-function-attribute_002c-x86"></a>
  673. <p>Enable/disable the generation of the sse4.2 instructions.
  674. </p>
  675. </dd>
  676. <dt>&lsquo;<samp>sse4a</samp>&rsquo;</dt>
  677. <dt>&lsquo;<samp>no-sse4a</samp>&rsquo;</dt>
  678. <dd><a name="index-target_0028_0022sse4a_0022_0029-function-attribute_002c-x86"></a>
  679. <p>Enable/disable the generation of the SSE4A instructions.
  680. </p>
  681. </dd>
  682. <dt>&lsquo;<samp>ssse3</samp>&rsquo;</dt>
  683. <dt>&lsquo;<samp>no-ssse3</samp>&rsquo;</dt>
  684. <dd><a name="index-target_0028_0022ssse3_0022_0029-function-attribute_002c-x86"></a>
  685. <p>Enable/disable the generation of the SSSE3 instructions.
  686. </p>
  687. </dd>
  688. <dt>&lsquo;<samp>tbm</samp>&rsquo;</dt>
  689. <dt>&lsquo;<samp>no-tbm</samp>&rsquo;</dt>
  690. <dd><a name="index-target_0028_0022tbm_0022_0029-function-attribute_002c-x86"></a>
  691. <p>Enable/disable the generation of the TBM instructions.
  692. </p>
  693. </dd>
  694. <dt>&lsquo;<samp>vaes</samp>&rsquo;</dt>
  695. <dt>&lsquo;<samp>no-vaes</samp>&rsquo;</dt>
  696. <dd><a name="index-target_0028_0022vaes_0022_0029-function-attribute_002c-x86"></a>
  697. <p>Enable/disable the generation of the VAES instructions.
  698. </p>
  699. </dd>
  700. <dt>&lsquo;<samp>vpclmulqdq</samp>&rsquo;</dt>
  701. <dt>&lsquo;<samp>no-vpclmulqdq</samp>&rsquo;</dt>
  702. <dd><a name="index-target_0028_0022vpclmulqdq_0022_0029-function-attribute_002c-x86"></a>
  703. <p>Enable/disable the generation of the VPCLMULQDQ instructions.
  704. </p>
  705. </dd>
  706. <dt>&lsquo;<samp>waitpkg</samp>&rsquo;</dt>
  707. <dt>&lsquo;<samp>no-waitpkg</samp>&rsquo;</dt>
  708. <dd><a name="index-target_0028_0022waitpkg_0022_0029-function-attribute_002c-x86"></a>
  709. <p>Enable/disable the generation of the WAITPKG instructions.
  710. </p>
  711. </dd>
  712. <dt>&lsquo;<samp>wbnoinvd</samp>&rsquo;</dt>
  713. <dt>&lsquo;<samp>no-wbnoinvd</samp>&rsquo;</dt>
  714. <dd><a name="index-target_0028_0022wbnoinvd_0022_0029-function-attribute_002c-x86"></a>
  715. <p>Enable/disable the generation of the WBNOINVD instructions.
  716. </p>
  717. </dd>
  718. <dt>&lsquo;<samp>xop</samp>&rsquo;</dt>
  719. <dt>&lsquo;<samp>no-xop</samp>&rsquo;</dt>
  720. <dd><a name="index-target_0028_0022xop_0022_0029-function-attribute_002c-x86"></a>
  721. <p>Enable/disable the generation of the XOP instructions.
  722. </p>
  723. </dd>
  724. <dt>&lsquo;<samp>xsave</samp>&rsquo;</dt>
  725. <dt>&lsquo;<samp>no-xsave</samp>&rsquo;</dt>
  726. <dd><a name="index-target_0028_0022xsave_0022_0029-function-attribute_002c-x86"></a>
  727. <p>Enable/disable the generation of the XSAVE instructions.
  728. </p>
  729. </dd>
  730. <dt>&lsquo;<samp>xsavec</samp>&rsquo;</dt>
  731. <dt>&lsquo;<samp>no-xsavec</samp>&rsquo;</dt>
  732. <dd><a name="index-target_0028_0022xsavec_0022_0029-function-attribute_002c-x86"></a>
  733. <p>Enable/disable the generation of the XSAVEC instructions.
  734. </p>
  735. </dd>
  736. <dt>&lsquo;<samp>xsaveopt</samp>&rsquo;</dt>
  737. <dt>&lsquo;<samp>no-xsaveopt</samp>&rsquo;</dt>
  738. <dd><a name="index-target_0028_0022xsaveopt_0022_0029-function-attribute_002c-x86"></a>
  739. <p>Enable/disable the generation of the XSAVEOPT instructions.
  740. </p>
  741. </dd>
  742. <dt>&lsquo;<samp>xsaves</samp>&rsquo;</dt>
  743. <dt>&lsquo;<samp>no-xsaves</samp>&rsquo;</dt>
  744. <dd><a name="index-target_0028_0022xsaves_0022_0029-function-attribute_002c-x86"></a>
  745. <p>Enable/disable the generation of the XSAVES instructions.
  746. </p>
  747. </dd>
  748. <dt>&lsquo;<samp>cld</samp>&rsquo;</dt>
  749. <dt>&lsquo;<samp>no-cld</samp>&rsquo;</dt>
  750. <dd><a name="index-target_0028_0022cld_0022_0029-function-attribute_002c-x86"></a>
  751. <p>Enable/disable the generation of the CLD before string moves.
  752. </p>
  753. </dd>
  754. <dt>&lsquo;<samp>fancy-math-387</samp>&rsquo;</dt>
  755. <dt>&lsquo;<samp>no-fancy-math-387</samp>&rsquo;</dt>
  756. <dd><a name="index-target_0028_0022fancy_002dmath_002d387_0022_0029-function-attribute_002c-x86"></a>
  757. <p>Enable/disable the generation of the <code>sin</code>, <code>cos</code>, and
  758. <code>sqrt</code> instructions on the 387 floating-point unit.
  759. </p>
  760. </dd>
  761. <dt>&lsquo;<samp>ieee-fp</samp>&rsquo;</dt>
  762. <dt>&lsquo;<samp>no-ieee-fp</samp>&rsquo;</dt>
  763. <dd><a name="index-target_0028_0022ieee_002dfp_0022_0029-function-attribute_002c-x86"></a>
  764. <p>Enable/disable the generation of floating point that depends on IEEE arithmetic.
  765. </p>
  766. </dd>
  767. <dt>&lsquo;<samp>inline-all-stringops</samp>&rsquo;</dt>
  768. <dt>&lsquo;<samp>no-inline-all-stringops</samp>&rsquo;</dt>
  769. <dd><a name="index-target_0028_0022inline_002dall_002dstringops_0022_0029-function-attribute_002c-x86"></a>
  770. <p>Enable/disable inlining of string operations.
  771. </p>
  772. </dd>
  773. <dt>&lsquo;<samp>inline-stringops-dynamically</samp>&rsquo;</dt>
  774. <dt>&lsquo;<samp>no-inline-stringops-dynamically</samp>&rsquo;</dt>
  775. <dd><a name="index-target_0028_0022inline_002dstringops_002ddynamically_0022_0029-function-attribute_002c-x86"></a>
  776. <p>Enable/disable the generation of the inline code to do small string
  777. operations and calling the library routines for large operations.
  778. </p>
  779. </dd>
  780. <dt>&lsquo;<samp>align-stringops</samp>&rsquo;</dt>
  781. <dt>&lsquo;<samp>no-align-stringops</samp>&rsquo;</dt>
  782. <dd><a name="index-target_0028_0022align_002dstringops_0022_0029-function-attribute_002c-x86"></a>
  783. <p>Do/do not align destination of inlined string operations.
  784. </p>
  785. </dd>
  786. <dt>&lsquo;<samp>recip</samp>&rsquo;</dt>
  787. <dt>&lsquo;<samp>no-recip</samp>&rsquo;</dt>
  788. <dd><a name="index-target_0028_0022recip_0022_0029-function-attribute_002c-x86"></a>
  789. <p>Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS
  790. instructions followed an additional Newton-Raphson step instead of
  791. doing a floating-point division.
  792. </p>
  793. </dd>
  794. <dt>&lsquo;<samp>arch=<var>ARCH</var></samp>&rsquo;</dt>
  795. <dd><a name="index-target_0028_0022arch_003dARCH_0022_0029-function-attribute_002c-x86"></a>
  796. <p>Specify the architecture to generate code for in compiling the function.
  797. </p>
  798. </dd>
  799. <dt>&lsquo;<samp>tune=<var>TUNE</var></samp>&rsquo;</dt>
  800. <dd><a name="index-target_0028_0022tune_003dTUNE_0022_0029-function-attribute_002c-x86"></a>
  801. <p>Specify the architecture to tune for in compiling the function.
  802. </p>
  803. </dd>
  804. <dt>&lsquo;<samp>fpmath=<var>FPMATH</var></samp>&rsquo;</dt>
  805. <dd><a name="index-target_0028_0022fpmath_003dFPMATH_0022_0029-function-attribute_002c-x86"></a>
  806. <p>Specify which floating-point unit to use. You must specify the
  807. <code>target(&quot;fpmath=sse,387&quot;)</code> option as
  808. <code>target(&quot;fpmath=sse+387&quot;)</code> because the comma would separate
  809. different options.
  810. </p>
  811. </dd>
  812. <dt>&lsquo;<samp>indirect_branch(&quot;<var>choice</var>&quot;)</samp>&rsquo;</dt>
  813. <dd><a name="index-indirect_005fbranch-function-attribute_002c-x86"></a>
  814. <p>On x86 targets, the <code>indirect_branch</code> attribute causes the compiler
  815. to convert indirect call and jump with <var>choice</var>. &lsquo;<samp>keep</samp>&rsquo;
  816. keeps indirect call and jump unmodified. &lsquo;<samp>thunk</samp>&rsquo; converts indirect
  817. call and jump to call and return thunk. &lsquo;<samp>thunk-inline</samp>&rsquo; converts
  818. indirect call and jump to inlined call and return thunk.
  819. &lsquo;<samp>thunk-extern</samp>&rsquo; converts indirect call and jump to external call
  820. and return thunk provided in a separate object file.
  821. </p>
  822. </dd>
  823. <dt>&lsquo;<samp>function_return(&quot;<var>choice</var>&quot;)</samp>&rsquo;</dt>
  824. <dd><a name="index-function_005freturn-function-attribute_002c-x86"></a>
  825. <p>On x86 targets, the <code>function_return</code> attribute causes the compiler
  826. to convert function return with <var>choice</var>. &lsquo;<samp>keep</samp>&rsquo; keeps function
  827. return unmodified. &lsquo;<samp>thunk</samp>&rsquo; converts function return to call and
  828. return thunk. &lsquo;<samp>thunk-inline</samp>&rsquo; converts function return to inlined
  829. call and return thunk. &lsquo;<samp>thunk-extern</samp>&rsquo; converts function return to
  830. external call and return thunk provided in a separate object file.
  831. </p>
  832. </dd>
  833. <dt>&lsquo;<samp>nocf_check</samp>&rsquo;</dt>
  834. <dd><a name="index-nocf_005fcheck-function-attribute"></a>
  835. <p>The <code>nocf_check</code> attribute on a function is used to inform the
  836. compiler that the function&rsquo;s prologue should not be instrumented when
  837. compiled with the <samp>-fcf-protection=branch</samp> option. The
  838. compiler assumes that the function&rsquo;s address is a valid target for a
  839. control-flow transfer.
  840. </p>
  841. <p>The <code>nocf_check</code> attribute on a type of pointer to function is
  842. used to inform the compiler that a call through the pointer should
  843. not be instrumented when compiled with the
  844. <samp>-fcf-protection=branch</samp> option. The compiler assumes
  845. that the function&rsquo;s address from the pointer is a valid target for
  846. a control-flow transfer. A direct function call through a function
  847. name is assumed to be a safe call thus direct calls are not
  848. instrumented by the compiler.
  849. </p>
  850. <p>The <code>nocf_check</code> attribute is applied to an object&rsquo;s type.
  851. In case of assignment of a function address or a function pointer to
  852. another pointer, the attribute is not carried over from the right-hand
  853. object&rsquo;s type; the type of left-hand object stays unchanged. The
  854. compiler checks for <code>nocf_check</code> attribute mismatch and reports
  855. a warning in case of mismatch.
  856. </p>
  857. <div class="smallexample">
  858. <pre class="smallexample">{
  859. int foo (void) __attribute__(nocf_check);
  860. void (*foo1)(void) __attribute__(nocf_check);
  861. void (*foo2)(void);
  862. /* foo's address is assumed to be valid. */
  863. int
  864. foo (void)
  865. /* This call site is not checked for control-flow
  866. validity. */
  867. (*foo1)();
  868. /* A warning is issued about attribute mismatch. */
  869. foo1 = foo2;
  870. /* This call site is still not checked. */
  871. (*foo1)();
  872. /* This call site is checked. */
  873. (*foo2)();
  874. /* A warning is issued about attribute mismatch. */
  875. foo2 = foo1;
  876. /* This call site is still checked. */
  877. (*foo2)();
  878. return 0;
  879. }
  880. </pre></div>
  881. </dd>
  882. <dt>&lsquo;<samp>cf_check</samp>&rsquo;</dt>
  883. <dd><a name="index-cf_005fcheck-function-attribute_002c-x86"></a>
  884. <p>The <code>cf_check</code> attribute on a function is used to inform the
  885. compiler that ENDBR instruction should be placed at the function
  886. entry when <samp>-fcf-protection=branch</samp> is enabled.
  887. </p>
  888. </dd>
  889. <dt>&lsquo;<samp>indirect_return</samp>&rsquo;</dt>
  890. <dd><a name="index-indirect_005freturn-function-attribute_002c-x86"></a>
  891. <p>The <code>indirect_return</code> attribute can be applied to a function,
  892. as well as variable or type of function pointer to inform the
  893. compiler that the function may return via indirect branch.
  894. </p>
  895. </dd>
  896. <dt>&lsquo;<samp>fentry_name(&quot;<var>name</var>&quot;)</samp>&rsquo;</dt>
  897. <dd><a name="index-fentry_005fname-function-attribute_002c-x86"></a>
  898. <p>On x86 targets, the <code>fentry_name</code> attribute sets the function to
  899. call on function entry when function instrumentation is enabled
  900. with <samp>-pg -mfentry</samp>. When <var>name</var> is nop then a 5 byte
  901. nop sequence is generated.
  902. </p>
  903. </dd>
  904. <dt>&lsquo;<samp>fentry_section(&quot;<var>name</var>&quot;)</samp>&rsquo;</dt>
  905. <dd><a name="index-fentry_005fsection-function-attribute_002c-x86"></a>
  906. <p>On x86 targets, the <code>fentry_section</code> attribute sets the name
  907. of the section to record function entry instrumentation calls in when
  908. enabled with <samp>-pg -mrecord-mcount</samp>
  909. </p>
  910. </dd>
  911. </dl>
  912. <p>On the x86, the inliner does not inline a
  913. function that has different target options than the caller, unless the
  914. callee has a subset of the target options of the caller. For example
  915. a function declared with <code>target(&quot;sse3&quot;)</code> can inline a function
  916. with <code>target(&quot;sse2&quot;)</code>, since <code>-msse3</code> implies <code>-msse2</code>.
  917. </p></dd>
  918. </dl>
  919. <hr>
  920. <div class="header">
  921. <p>
  922. Next: <a href="Xstormy16-Function-Attributes.html#Xstormy16-Function-Attributes" accesskey="n" rel="next">Xstormy16 Function Attributes</a>, Previous: <a href="Visium-Function-Attributes.html#Visium-Function-Attributes" accesskey="p" rel="prev">Visium Function Attributes</a>, Up: <a href="Function-Attributes.html#Function-Attributes" accesskey="u" rel="up">Function Attributes</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>
  923. </div>
  924. </body>
  925. </html>