x86-Function-Attributes.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  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-2017 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 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): x86 Function Attributes</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): x86 Function Attributes">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): x86 Function Attributes">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="x86-Function-Attributes"></a>
  63. <div class="header">
  64. <p>
  65. 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>
  66. </div>
  67. <hr>
  68. <a name="x86-Function-Attributes-1"></a>
  69. <h4 class="subsection">6.31.32 x86 Function Attributes</h4>
  70. <p>These function attributes are supported by the x86 back end:
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>cdecl</code></dt>
  74. <dd><a name="index-cdecl-function-attribute_002c-x86_002d32"></a>
  75. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32"></a>
  76. <a name="index-mrtd-2"></a>
  77. <p>On the x86-32 targets, the <code>cdecl</code> attribute causes the compiler to
  78. assume that the calling function pops off the stack space used to
  79. pass arguments. This is
  80. useful to override the effects of the <samp>-mrtd</samp> switch.
  81. </p>
  82. </dd>
  83. <dt><code>fastcall</code></dt>
  84. <dd><a name="index-fastcall-function-attribute_002c-x86_002d32"></a>
  85. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-1"></a>
  86. <p>On x86-32 targets, the <code>fastcall</code> attribute causes the compiler to
  87. pass the first argument (if of integral type) in the register ECX and
  88. the second argument (if of integral type) in the register EDX. Subsequent
  89. and other typed arguments are passed on the stack. The called function
  90. pops the arguments off the stack. If the number of arguments is variable all
  91. arguments are pushed on the stack.
  92. </p>
  93. </dd>
  94. <dt><code>thiscall</code></dt>
  95. <dd><a name="index-thiscall-function-attribute_002c-x86_002d32"></a>
  96. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-2"></a>
  97. <p>On x86-32 targets, the <code>thiscall</code> attribute causes the compiler to
  98. pass the first argument (if of integral type) in the register ECX.
  99. Subsequent and other typed arguments are passed on the stack. The called
  100. function pops the arguments off the stack.
  101. If the number of arguments is variable all arguments are pushed on the
  102. stack.
  103. The <code>thiscall</code> attribute is intended for C++ non-static member functions.
  104. As a GCC extension, this calling convention can be used for C functions
  105. and for static member methods.
  106. </p>
  107. </dd>
  108. <dt><code>ms_abi</code></dt>
  109. <dt><code>sysv_abi</code></dt>
  110. <dd><a name="index-ms_005fabi-function-attribute_002c-x86"></a>
  111. <a name="index-sysv_005fabi-function-attribute_002c-x86"></a>
  112. <p>On 32-bit and 64-bit x86 targets, you can use an ABI attribute
  113. to indicate which calling convention should be used for a function. The
  114. <code>ms_abi</code> attribute tells the compiler to use the Microsoft ABI,
  115. while the <code>sysv_abi</code> attribute tells the compiler to use the ABI
  116. used on GNU/Linux and other systems. The default is to use the Microsoft ABI
  117. when targeting Windows. On all other systems, the default is the x86/AMD ABI.
  118. </p>
  119. <p>Note, the <code>ms_abi</code> attribute for Microsoft Windows 64-bit targets currently
  120. requires the <samp>-maccumulate-outgoing-args</samp> option.
  121. </p>
  122. </dd>
  123. <dt><code>callee_pop_aggregate_return (<var>number</var>)</code></dt>
  124. <dd><a name="index-callee_005fpop_005faggregate_005freturn-function-attribute_002c-x86"></a>
  125. <p>On x86-32 targets, you can use this attribute to control how
  126. aggregates are returned in memory. If the caller is responsible for
  127. popping the hidden pointer together with the rest of the arguments, specify
  128. <var>number</var> equal to zero. If callee is responsible for popping the
  129. hidden pointer, specify <var>number</var> equal to one.
  130. </p>
  131. <p>The default x86-32 ABI assumes that the callee pops the
  132. stack for hidden pointer. However, on x86-32 Microsoft Windows targets,
  133. the compiler assumes that the
  134. caller pops the stack for hidden pointer.
  135. </p>
  136. </dd>
  137. <dt><code>ms_hook_prologue</code></dt>
  138. <dd><a name="index-ms_005fhook_005fprologue-function-attribute_002c-x86"></a>
  139. <p>On 32-bit and 64-bit x86 targets, you can use
  140. this function attribute to make GCC generate the &ldquo;hot-patching&rdquo; function
  141. prologue used in Win32 API functions in Microsoft Windows XP Service Pack 2
  142. and newer.
  143. </p>
  144. </dd>
  145. <dt><code>regparm (<var>number</var>)</code></dt>
  146. <dd><a name="index-regparm-function-attribute_002c-x86"></a>
  147. <a name="index-functions-that-are-passed-arguments-in-registers-on-x86_002d32"></a>
  148. <p>On x86-32 targets, the <code>regparm</code> attribute causes the compiler to
  149. pass arguments number one to <var>number</var> if they are of integral type
  150. in registers EAX, EDX, and ECX instead of on the stack. Functions that
  151. take a variable number of arguments continue to be passed all of their
  152. arguments on the stack.
  153. </p>
  154. <p>Beware that on some ELF systems this attribute is unsuitable for
  155. global functions in shared libraries with lazy binding (which is the
  156. default). Lazy binding sends the first call via resolving code in
  157. the loader, which might assume EAX, EDX and ECX can be clobbered, as
  158. per the standard calling conventions. Solaris 8 is affected by this.
  159. Systems with the GNU C Library version 2.1 or higher
  160. and FreeBSD are believed to be
  161. safe since the loaders there save EAX, EDX and ECX. (Lazy binding can be
  162. disabled with the linker or the loader if desired, to avoid the
  163. problem.)
  164. </p>
  165. </dd>
  166. <dt><code>sseregparm</code></dt>
  167. <dd><a name="index-sseregparm-function-attribute_002c-x86"></a>
  168. <p>On x86-32 targets with SSE support, the <code>sseregparm</code> attribute
  169. causes the compiler to pass up to 3 floating-point arguments in
  170. SSE registers instead of on the stack. Functions that take a
  171. variable number of arguments continue to pass all of their
  172. floating-point arguments on the stack.
  173. </p>
  174. </dd>
  175. <dt><code>force_align_arg_pointer</code></dt>
  176. <dd><a name="index-force_005falign_005farg_005fpointer-function-attribute_002c-x86"></a>
  177. <p>On x86 targets, the <code>force_align_arg_pointer</code> attribute may be
  178. applied to individual function definitions, generating an alternate
  179. prologue and epilogue that realigns the run-time stack if necessary.
  180. This supports mixing legacy codes that run with a 4-byte aligned stack
  181. with modern codes that keep a 16-byte stack for SSE compatibility.
  182. </p>
  183. </dd>
  184. <dt><code>stdcall</code></dt>
  185. <dd><a name="index-stdcall-function-attribute_002c-x86_002d32"></a>
  186. <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-3"></a>
  187. <p>On x86-32 targets, the <code>stdcall</code> attribute causes the compiler to
  188. assume that the called function pops off the stack space used to
  189. pass arguments, unless it takes a variable number of arguments.
  190. </p>
  191. </dd>
  192. <dt><code>no_caller_saved_registers</code></dt>
  193. <dd><a name="index-no_005fcaller_005fsaved_005fregisters-function-attribute_002c-x86"></a>
  194. <p>Use this attribute to indicate that the specified function has no
  195. caller-saved registers. That is, all registers are callee-saved. For
  196. example, this attribute can be used for a function called from an
  197. interrupt handler. The compiler generates proper function entry and
  198. exit sequences to save and restore any modified registers, except for
  199. the EFLAGS register. Since GCC doesn&rsquo;t preserve MPX, SSE, MMX nor x87
  200. states, the GCC option <samp>-mgeneral-regs-only</samp> should be used to
  201. compile functions with <code>no_caller_saved_registers</code> attribute.
  202. </p>
  203. </dd>
  204. <dt><code>interrupt</code></dt>
  205. <dd><a name="index-interrupt-function-attribute_002c-x86"></a>
  206. <p>Use this attribute to indicate that the specified function is an
  207. interrupt handler or an exception handler (depending on parameters passed
  208. to the function, explained further). The compiler generates function
  209. entry and exit sequences suitable for use in an interrupt handler when
  210. this attribute is present. The <code>IRET</code> instruction, instead of the
  211. <code>RET</code> instruction, is used to return from interrupt handlers. All
  212. registers, except for the EFLAGS register which is restored by the
  213. <code>IRET</code> instruction, are preserved by the compiler. Since GCC
  214. doesn&rsquo;t preserve MPX, SSE, MMX nor x87 states, the GCC option
  215. <samp>-mgeneral-regs-only</samp> should be used to compile interrupt and
  216. exception handlers.
  217. </p>
  218. <p>Any interruptible-without-stack-switch code must be compiled with
  219. <samp>-mno-red-zone</samp> since interrupt handlers can and will, because
  220. of the hardware design, touch the red zone.
  221. </p>
  222. <p>An interrupt handler must be declared with a mandatory pointer
  223. argument:
  224. </p>
  225. <div class="smallexample">
  226. <pre class="smallexample">struct interrupt_frame;
  227. __attribute__ ((interrupt))
  228. void
  229. f (struct interrupt_frame *frame)
  230. {
  231. }
  232. </pre></div>
  233. <p>and you must define <code>struct interrupt_frame</code> as described in the
  234. processor&rsquo;s manual.
  235. </p>
  236. <p>Exception handlers differ from interrupt handlers because the system
  237. pushes an error code on the stack. An exception handler declaration is
  238. similar to that for an interrupt handler, but with a different mandatory
  239. function signature. The compiler arranges to pop the error code off the
  240. stack before the <code>IRET</code> instruction.
  241. </p>
  242. <div class="smallexample">
  243. <pre class="smallexample">#ifdef __x86_64__
  244. typedef unsigned long long int uword_t;
  245. #else
  246. typedef unsigned int uword_t;
  247. #endif
  248. struct interrupt_frame;
  249. __attribute__ ((interrupt))
  250. void
  251. f (struct interrupt_frame *frame, uword_t error_code)
  252. {
  253. ...
  254. }
  255. </pre></div>
  256. <p>Exception handlers should only be used for exceptions that push an error
  257. code; you should use an interrupt handler in other cases. The system
  258. will crash if the wrong kind of handler is used.
  259. </p>
  260. </dd>
  261. <dt><code>target (<var>options</var>)</code></dt>
  262. <dd><a name="index-target-function-attribute-5"></a>
  263. <p>As discussed in <a href="Common-Function-Attributes.html#Common-Function-Attributes">Common Function Attributes</a>, this attribute
  264. allows specification of target-specific compilation options.
  265. </p>
  266. <p>On the x86, the following options are allowed:
  267. </p><dl compact="compact">
  268. <dt>&lsquo;<samp>abm</samp>&rsquo;</dt>
  269. <dt>&lsquo;<samp>no-abm</samp>&rsquo;</dt>
  270. <dd><a name="index-target_0028_0022abm_0022_0029-function-attribute_002c-x86"></a>
  271. <p>Enable/disable the generation of the advanced bit instructions.
  272. </p>
  273. </dd>
  274. <dt>&lsquo;<samp>aes</samp>&rsquo;</dt>
  275. <dt>&lsquo;<samp>no-aes</samp>&rsquo;</dt>
  276. <dd><a name="index-target_0028_0022aes_0022_0029-function-attribute_002c-x86"></a>
  277. <p>Enable/disable the generation of the AES instructions.
  278. </p>
  279. </dd>
  280. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  281. <dd><a name="index-target_0028_0022default_0022_0029-function-attribute_002c-x86"></a>
  282. <p>See <a href="Function-Multiversioning.html#Function-Multiversioning">Function Multiversioning</a>, where it is used to specify the
  283. default function version.
  284. </p>
  285. </dd>
  286. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  287. <dt>&lsquo;<samp>no-mmx</samp>&rsquo;</dt>
  288. <dd><a name="index-target_0028_0022mmx_0022_0029-function-attribute_002c-x86"></a>
  289. <p>Enable/disable the generation of the MMX instructions.
  290. </p>
  291. </dd>
  292. <dt>&lsquo;<samp>pclmul</samp>&rsquo;</dt>
  293. <dt>&lsquo;<samp>no-pclmul</samp>&rsquo;</dt>
  294. <dd><a name="index-target_0028_0022pclmul_0022_0029-function-attribute_002c-x86"></a>
  295. <p>Enable/disable the generation of the PCLMUL instructions.
  296. </p>
  297. </dd>
  298. <dt>&lsquo;<samp>popcnt</samp>&rsquo;</dt>
  299. <dt>&lsquo;<samp>no-popcnt</samp>&rsquo;</dt>
  300. <dd><a name="index-target_0028_0022popcnt_0022_0029-function-attribute_002c-x86"></a>
  301. <p>Enable/disable the generation of the POPCNT instruction.
  302. </p>
  303. </dd>
  304. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  305. <dt>&lsquo;<samp>no-sse</samp>&rsquo;</dt>
  306. <dd><a name="index-target_0028_0022sse_0022_0029-function-attribute_002c-x86"></a>
  307. <p>Enable/disable the generation of the SSE instructions.
  308. </p>
  309. </dd>
  310. <dt>&lsquo;<samp>sse2</samp>&rsquo;</dt>
  311. <dt>&lsquo;<samp>no-sse2</samp>&rsquo;</dt>
  312. <dd><a name="index-target_0028_0022sse2_0022_0029-function-attribute_002c-x86"></a>
  313. <p>Enable/disable the generation of the SSE2 instructions.
  314. </p>
  315. </dd>
  316. <dt>&lsquo;<samp>sse3</samp>&rsquo;</dt>
  317. <dt>&lsquo;<samp>no-sse3</samp>&rsquo;</dt>
  318. <dd><a name="index-target_0028_0022sse3_0022_0029-function-attribute_002c-x86"></a>
  319. <p>Enable/disable the generation of the SSE3 instructions.
  320. </p>
  321. </dd>
  322. <dt>&lsquo;<samp>sse4</samp>&rsquo;</dt>
  323. <dt>&lsquo;<samp>no-sse4</samp>&rsquo;</dt>
  324. <dd><a name="index-target_0028_0022sse4_0022_0029-function-attribute_002c-x86"></a>
  325. <p>Enable/disable the generation of the SSE4 instructions (both SSE4.1
  326. and SSE4.2).
  327. </p>
  328. </dd>
  329. <dt>&lsquo;<samp>sse4.1</samp>&rsquo;</dt>
  330. <dt>&lsquo;<samp>no-sse4.1</samp>&rsquo;</dt>
  331. <dd><a name="index-target_0028_0022sse4_002e1_0022_0029-function-attribute_002c-x86"></a>
  332. <p>Enable/disable the generation of the sse4.1 instructions.
  333. </p>
  334. </dd>
  335. <dt>&lsquo;<samp>sse4.2</samp>&rsquo;</dt>
  336. <dt>&lsquo;<samp>no-sse4.2</samp>&rsquo;</dt>
  337. <dd><a name="index-target_0028_0022sse4_002e2_0022_0029-function-attribute_002c-x86"></a>
  338. <p>Enable/disable the generation of the sse4.2 instructions.
  339. </p>
  340. </dd>
  341. <dt>&lsquo;<samp>sse4a</samp>&rsquo;</dt>
  342. <dt>&lsquo;<samp>no-sse4a</samp>&rsquo;</dt>
  343. <dd><a name="index-target_0028_0022sse4a_0022_0029-function-attribute_002c-x86"></a>
  344. <p>Enable/disable the generation of the SSE4A instructions.
  345. </p>
  346. </dd>
  347. <dt>&lsquo;<samp>fma4</samp>&rsquo;</dt>
  348. <dt>&lsquo;<samp>no-fma4</samp>&rsquo;</dt>
  349. <dd><a name="index-target_0028_0022fma4_0022_0029-function-attribute_002c-x86"></a>
  350. <p>Enable/disable the generation of the FMA4 instructions.
  351. </p>
  352. </dd>
  353. <dt>&lsquo;<samp>xop</samp>&rsquo;</dt>
  354. <dt>&lsquo;<samp>no-xop</samp>&rsquo;</dt>
  355. <dd><a name="index-target_0028_0022xop_0022_0029-function-attribute_002c-x86"></a>
  356. <p>Enable/disable the generation of the XOP instructions.
  357. </p>
  358. </dd>
  359. <dt>&lsquo;<samp>lwp</samp>&rsquo;</dt>
  360. <dt>&lsquo;<samp>no-lwp</samp>&rsquo;</dt>
  361. <dd><a name="index-target_0028_0022lwp_0022_0029-function-attribute_002c-x86"></a>
  362. <p>Enable/disable the generation of the LWP instructions.
  363. </p>
  364. </dd>
  365. <dt>&lsquo;<samp>ssse3</samp>&rsquo;</dt>
  366. <dt>&lsquo;<samp>no-ssse3</samp>&rsquo;</dt>
  367. <dd><a name="index-target_0028_0022ssse3_0022_0029-function-attribute_002c-x86"></a>
  368. <p>Enable/disable the generation of the SSSE3 instructions.
  369. </p>
  370. </dd>
  371. <dt>&lsquo;<samp>cld</samp>&rsquo;</dt>
  372. <dt>&lsquo;<samp>no-cld</samp>&rsquo;</dt>
  373. <dd><a name="index-target_0028_0022cld_0022_0029-function-attribute_002c-x86"></a>
  374. <p>Enable/disable the generation of the CLD before string moves.
  375. </p>
  376. </dd>
  377. <dt>&lsquo;<samp>fancy-math-387</samp>&rsquo;</dt>
  378. <dt>&lsquo;<samp>no-fancy-math-387</samp>&rsquo;</dt>
  379. <dd><a name="index-target_0028_0022fancy_002dmath_002d387_0022_0029-function-attribute_002c-x86"></a>
  380. <p>Enable/disable the generation of the <code>sin</code>, <code>cos</code>, and
  381. <code>sqrt</code> instructions on the 387 floating-point unit.
  382. </p>
  383. </dd>
  384. <dt>&lsquo;<samp>ieee-fp</samp>&rsquo;</dt>
  385. <dt>&lsquo;<samp>no-ieee-fp</samp>&rsquo;</dt>
  386. <dd><a name="index-target_0028_0022ieee_002dfp_0022_0029-function-attribute_002c-x86"></a>
  387. <p>Enable/disable the generation of floating point that depends on IEEE arithmetic.
  388. </p>
  389. </dd>
  390. <dt>&lsquo;<samp>inline-all-stringops</samp>&rsquo;</dt>
  391. <dt>&lsquo;<samp>no-inline-all-stringops</samp>&rsquo;</dt>
  392. <dd><a name="index-target_0028_0022inline_002dall_002dstringops_0022_0029-function-attribute_002c-x86"></a>
  393. <p>Enable/disable inlining of string operations.
  394. </p>
  395. </dd>
  396. <dt>&lsquo;<samp>inline-stringops-dynamically</samp>&rsquo;</dt>
  397. <dt>&lsquo;<samp>no-inline-stringops-dynamically</samp>&rsquo;</dt>
  398. <dd><a name="index-target_0028_0022inline_002dstringops_002ddynamically_0022_0029-function-attribute_002c-x86"></a>
  399. <p>Enable/disable the generation of the inline code to do small string
  400. operations and calling the library routines for large operations.
  401. </p>
  402. </dd>
  403. <dt>&lsquo;<samp>align-stringops</samp>&rsquo;</dt>
  404. <dt>&lsquo;<samp>no-align-stringops</samp>&rsquo;</dt>
  405. <dd><a name="index-target_0028_0022align_002dstringops_0022_0029-function-attribute_002c-x86"></a>
  406. <p>Do/do not align destination of inlined string operations.
  407. </p>
  408. </dd>
  409. <dt>&lsquo;<samp>recip</samp>&rsquo;</dt>
  410. <dt>&lsquo;<samp>no-recip</samp>&rsquo;</dt>
  411. <dd><a name="index-target_0028_0022recip_0022_0029-function-attribute_002c-x86"></a>
  412. <p>Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS
  413. instructions followed an additional Newton-Raphson step instead of
  414. doing a floating-point division.
  415. </p>
  416. </dd>
  417. <dt>&lsquo;<samp>arch=<var>ARCH</var></samp>&rsquo;</dt>
  418. <dd><a name="index-target_0028_0022arch_003dARCH_0022_0029-function-attribute_002c-x86"></a>
  419. <p>Specify the architecture to generate code for in compiling the function.
  420. </p>
  421. </dd>
  422. <dt>&lsquo;<samp>tune=<var>TUNE</var></samp>&rsquo;</dt>
  423. <dd><a name="index-target_0028_0022tune_003dTUNE_0022_0029-function-attribute_002c-x86"></a>
  424. <p>Specify the architecture to tune for in compiling the function.
  425. </p>
  426. </dd>
  427. <dt>&lsquo;<samp>fpmath=<var>FPMATH</var></samp>&rsquo;</dt>
  428. <dd><a name="index-target_0028_0022fpmath_003dFPMATH_0022_0029-function-attribute_002c-x86"></a>
  429. <p>Specify which floating-point unit to use. You must specify the
  430. <code>target(&quot;fpmath=sse,387&quot;)</code> option as
  431. <code>target(&quot;fpmath=sse+387&quot;)</code> because the comma would separate
  432. different options.
  433. </p>
  434. </dd>
  435. <dt>&lsquo;<samp>indirect_branch(&quot;<var>choice</var>&quot;)</samp>&rsquo;</dt>
  436. <dd><a name="index-indirect_005fbranch-function-attribute_002c-x86"></a>
  437. <p>On x86 targets, the <code>indirect_branch</code> attribute causes the compiler
  438. to convert indirect call and jump with <var>choice</var>. &lsquo;<samp>keep</samp>&rsquo;
  439. keeps indirect call and jump unmodified. &lsquo;<samp>thunk</samp>&rsquo; converts indirect
  440. call and jump to call and return thunk. &lsquo;<samp>thunk-inline</samp>&rsquo; converts
  441. indirect call and jump to inlined call and return thunk.
  442. &lsquo;<samp>thunk-extern</samp>&rsquo; converts indirect call and jump to external call
  443. and return thunk provided in a separate object file.
  444. </p>
  445. </dd>
  446. <dt>&lsquo;<samp>function_return(&quot;<var>choice</var>&quot;)</samp>&rsquo;</dt>
  447. <dd><a name="index-function_005freturn-function-attribute_002c-x86"></a>
  448. <p>On x86 targets, the <code>function_return</code> attribute causes the compiler
  449. to convert function return with <var>choice</var>. &lsquo;<samp>keep</samp>&rsquo; keeps function
  450. return unmodified. &lsquo;<samp>thunk</samp>&rsquo; converts function return to call and
  451. return thunk. &lsquo;<samp>thunk-inline</samp>&rsquo; converts function return to inlined
  452. call and return thunk. &lsquo;<samp>thunk-extern</samp>&rsquo; converts function return to
  453. external call and return thunk provided in a separate object file.
  454. </p></dd>
  455. </dl>
  456. <p>On the x86, the inliner does not inline a
  457. function that has different target options than the caller, unless the
  458. callee has a subset of the target options of the caller. For example
  459. a function declared with <code>target(&quot;sse3&quot;)</code> can inline a function
  460. with <code>target(&quot;sse2&quot;)</code>, since <code>-msse3</code> implies <code>-msse2</code>.
  461. </p></dd>
  462. </dl>
  463. <hr>
  464. <div class="header">
  465. <p>
  466. 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>
  467. </div>
  468. </body>
  469. </html>