123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- Invariant Sections being "Funding Free Software", the Front-Cover
- Texts being (a) (see below), and with the Back-Cover Texts being (b)
- (see below). A copy of the license is included in the section entitled
- "GNU Free Documentation License".
- (a) The FSF's Front-Cover Text is:
- A GNU Manual
- (b) The FSF's Back-Cover Text is:
- You have freedom to copy and modify this GNU Manual, like GNU
- software. Copies published by the Free Software Foundation raise
- funds for GNU development. -->
- <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
- <head>
- <title>Using the GNU Compiler Collection (GCC): x86 Function Attributes</title>
- <meta name="description" content="Using the GNU Compiler Collection (GCC): x86 Function Attributes">
- <meta name="keywords" content="Using the GNU Compiler Collection (GCC): x86 Function Attributes">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
- <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="Function-Attributes.html#Function-Attributes" rel="up" title="Function Attributes">
- <link href="Xstormy16-Function-Attributes.html#Xstormy16-Function-Attributes" rel="next" title="Xstormy16 Function Attributes">
- <link href="Visium-Function-Attributes.html#Visium-Function-Attributes" rel="prev" title="Visium Function Attributes">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.indentedblock {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style:oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nocodebreak {white-space:nowrap}
- span.nolinebreak {white-space:nowrap}
- span.roman {font-family:serif; font-weight:normal}
- span.sansserif {font-family:sans-serif; font-weight:normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
- </head>
- <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
- <a name="x86-Function-Attributes"></a>
- <div class="header">
- <p>
- 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> [<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>
- </div>
- <hr>
- <a name="x86-Function-Attributes-1"></a>
- <h4 class="subsection">6.31.32 x86 Function Attributes</h4>
- <p>These function attributes are supported by the x86 back end:
- </p>
- <dl compact="compact">
- <dt><code>cdecl</code></dt>
- <dd><a name="index-cdecl-function-attribute_002c-x86_002d32"></a>
- <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32"></a>
- <a name="index-mrtd-2"></a>
- <p>On the x86-32 targets, the <code>cdecl</code> attribute causes the compiler to
- assume that the calling function pops off the stack space used to
- pass arguments. This is
- useful to override the effects of the <samp>-mrtd</samp> switch.
- </p>
- </dd>
- <dt><code>fastcall</code></dt>
- <dd><a name="index-fastcall-function-attribute_002c-x86_002d32"></a>
- <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-1"></a>
- <p>On x86-32 targets, the <code>fastcall</code> attribute causes the compiler to
- pass the first argument (if of integral type) in the register ECX and
- the second argument (if of integral type) in the register EDX. Subsequent
- and other typed arguments are passed on the stack. The called function
- pops the arguments off the stack. If the number of arguments is variable all
- arguments are pushed on the stack.
- </p>
- </dd>
- <dt><code>thiscall</code></dt>
- <dd><a name="index-thiscall-function-attribute_002c-x86_002d32"></a>
- <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-2"></a>
- <p>On x86-32 targets, the <code>thiscall</code> attribute causes the compiler to
- pass the first argument (if of integral type) in the register ECX.
- Subsequent and other typed arguments are passed on the stack. The called
- function pops the arguments off the stack.
- If the number of arguments is variable all arguments are pushed on the
- stack.
- The <code>thiscall</code> attribute is intended for C++ non-static member functions.
- As a GCC extension, this calling convention can be used for C functions
- and for static member methods.
- </p>
- </dd>
- <dt><code>ms_abi</code></dt>
- <dt><code>sysv_abi</code></dt>
- <dd><a name="index-ms_005fabi-function-attribute_002c-x86"></a>
- <a name="index-sysv_005fabi-function-attribute_002c-x86"></a>
- <p>On 32-bit and 64-bit x86 targets, you can use an ABI attribute
- to indicate which calling convention should be used for a function. The
- <code>ms_abi</code> attribute tells the compiler to use the Microsoft ABI,
- while the <code>sysv_abi</code> attribute tells the compiler to use the ABI
- used on GNU/Linux and other systems. The default is to use the Microsoft ABI
- when targeting Windows. On all other systems, the default is the x86/AMD ABI.
- </p>
- <p>Note, the <code>ms_abi</code> attribute for Microsoft Windows 64-bit targets currently
- requires the <samp>-maccumulate-outgoing-args</samp> option.
- </p>
- </dd>
- <dt><code>callee_pop_aggregate_return (<var>number</var>)</code></dt>
- <dd><a name="index-callee_005fpop_005faggregate_005freturn-function-attribute_002c-x86"></a>
- <p>On x86-32 targets, you can use this attribute to control how
- aggregates are returned in memory. If the caller is responsible for
- popping the hidden pointer together with the rest of the arguments, specify
- <var>number</var> equal to zero. If callee is responsible for popping the
- hidden pointer, specify <var>number</var> equal to one.
- </p>
- <p>The default x86-32 ABI assumes that the callee pops the
- stack for hidden pointer. However, on x86-32 Microsoft Windows targets,
- the compiler assumes that the
- caller pops the stack for hidden pointer.
- </p>
- </dd>
- <dt><code>ms_hook_prologue</code></dt>
- <dd><a name="index-ms_005fhook_005fprologue-function-attribute_002c-x86"></a>
- <p>On 32-bit and 64-bit x86 targets, you can use
- this function attribute to make GCC generate the “hot-patching” function
- prologue used in Win32 API functions in Microsoft Windows XP Service Pack 2
- and newer.
- </p>
- </dd>
- <dt><code>regparm (<var>number</var>)</code></dt>
- <dd><a name="index-regparm-function-attribute_002c-x86"></a>
- <a name="index-functions-that-are-passed-arguments-in-registers-on-x86_002d32"></a>
- <p>On x86-32 targets, the <code>regparm</code> attribute causes the compiler to
- pass arguments number one to <var>number</var> if they are of integral type
- in registers EAX, EDX, and ECX instead of on the stack. Functions that
- take a variable number of arguments continue to be passed all of their
- arguments on the stack.
- </p>
- <p>Beware that on some ELF systems this attribute is unsuitable for
- global functions in shared libraries with lazy binding (which is the
- default). Lazy binding sends the first call via resolving code in
- the loader, which might assume EAX, EDX and ECX can be clobbered, as
- per the standard calling conventions. Solaris 8 is affected by this.
- Systems with the GNU C Library version 2.1 or higher
- and FreeBSD are believed to be
- safe since the loaders there save EAX, EDX and ECX. (Lazy binding can be
- disabled with the linker or the loader if desired, to avoid the
- problem.)
- </p>
- </dd>
- <dt><code>sseregparm</code></dt>
- <dd><a name="index-sseregparm-function-attribute_002c-x86"></a>
- <p>On x86-32 targets with SSE support, the <code>sseregparm</code> attribute
- causes the compiler to pass up to 3 floating-point arguments in
- SSE registers instead of on the stack. Functions that take a
- variable number of arguments continue to pass all of their
- floating-point arguments on the stack.
- </p>
- </dd>
- <dt><code>force_align_arg_pointer</code></dt>
- <dd><a name="index-force_005falign_005farg_005fpointer-function-attribute_002c-x86"></a>
- <p>On x86 targets, the <code>force_align_arg_pointer</code> attribute may be
- applied to individual function definitions, generating an alternate
- prologue and epilogue that realigns the run-time stack if necessary.
- This supports mixing legacy codes that run with a 4-byte aligned stack
- with modern codes that keep a 16-byte stack for SSE compatibility.
- </p>
- </dd>
- <dt><code>stdcall</code></dt>
- <dd><a name="index-stdcall-function-attribute_002c-x86_002d32"></a>
- <a name="index-functions-that-pop-the-argument-stack-on-x86_002d32-3"></a>
- <p>On x86-32 targets, the <code>stdcall</code> attribute causes the compiler to
- assume that the called function pops off the stack space used to
- pass arguments, unless it takes a variable number of arguments.
- </p>
- </dd>
- <dt><code>no_caller_saved_registers</code></dt>
- <dd><a name="index-no_005fcaller_005fsaved_005fregisters-function-attribute_002c-x86"></a>
- <p>Use this attribute to indicate that the specified function has no
- caller-saved registers. That is, all registers are callee-saved. For
- example, this attribute can be used for a function called from an
- interrupt handler. The compiler generates proper function entry and
- exit sequences to save and restore any modified registers, except for
- the EFLAGS register. Since GCC doesn’t preserve MPX, SSE, MMX nor x87
- states, the GCC option <samp>-mgeneral-regs-only</samp> should be used to
- compile functions with <code>no_caller_saved_registers</code> attribute.
- </p>
- </dd>
- <dt><code>interrupt</code></dt>
- <dd><a name="index-interrupt-function-attribute_002c-x86"></a>
- <p>Use this attribute to indicate that the specified function is an
- interrupt handler or an exception handler (depending on parameters passed
- to the function, explained further). The compiler generates function
- entry and exit sequences suitable for use in an interrupt handler when
- this attribute is present. The <code>IRET</code> instruction, instead of the
- <code>RET</code> instruction, is used to return from interrupt handlers. All
- registers, except for the EFLAGS register which is restored by the
- <code>IRET</code> instruction, are preserved by the compiler. Since GCC
- doesn’t preserve MPX, SSE, MMX nor x87 states, the GCC option
- <samp>-mgeneral-regs-only</samp> should be used to compile interrupt and
- exception handlers.
- </p>
- <p>Any interruptible-without-stack-switch code must be compiled with
- <samp>-mno-red-zone</samp> since interrupt handlers can and will, because
- of the hardware design, touch the red zone.
- </p>
- <p>An interrupt handler must be declared with a mandatory pointer
- argument:
- </p>
- <div class="smallexample">
- <pre class="smallexample">struct interrupt_frame;
- __attribute__ ((interrupt))
- void
- f (struct interrupt_frame *frame)
- {
- }
- </pre></div>
- <p>and you must define <code>struct interrupt_frame</code> as described in the
- processor’s manual.
- </p>
- <p>Exception handlers differ from interrupt handlers because the system
- pushes an error code on the stack. An exception handler declaration is
- similar to that for an interrupt handler, but with a different mandatory
- function signature. The compiler arranges to pop the error code off the
- stack before the <code>IRET</code> instruction.
- </p>
- <div class="smallexample">
- <pre class="smallexample">#ifdef __x86_64__
- typedef unsigned long long int uword_t;
- #else
- typedef unsigned int uword_t;
- #endif
- struct interrupt_frame;
- __attribute__ ((interrupt))
- void
- f (struct interrupt_frame *frame, uword_t error_code)
- {
- ...
- }
- </pre></div>
- <p>Exception handlers should only be used for exceptions that push an error
- code; you should use an interrupt handler in other cases. The system
- will crash if the wrong kind of handler is used.
- </p>
- </dd>
- <dt><code>target (<var>options</var>)</code></dt>
- <dd><a name="index-target-function-attribute-5"></a>
- <p>As discussed in <a href="Common-Function-Attributes.html#Common-Function-Attributes">Common Function Attributes</a>, this attribute
- allows specification of target-specific compilation options.
- </p>
- <p>On the x86, the following options are allowed:
- </p><dl compact="compact">
- <dt>‘<samp>abm</samp>’</dt>
- <dt>‘<samp>no-abm</samp>’</dt>
- <dd><a name="index-target_0028_0022abm_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the advanced bit instructions.
- </p>
- </dd>
- <dt>‘<samp>aes</samp>’</dt>
- <dt>‘<samp>no-aes</samp>’</dt>
- <dd><a name="index-target_0028_0022aes_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the AES instructions.
- </p>
- </dd>
- <dt>‘<samp>default</samp>’</dt>
- <dd><a name="index-target_0028_0022default_0022_0029-function-attribute_002c-x86"></a>
- <p>See <a href="Function-Multiversioning.html#Function-Multiversioning">Function Multiversioning</a>, where it is used to specify the
- default function version.
- </p>
- </dd>
- <dt>‘<samp>mmx</samp>’</dt>
- <dt>‘<samp>no-mmx</samp>’</dt>
- <dd><a name="index-target_0028_0022mmx_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the MMX instructions.
- </p>
- </dd>
- <dt>‘<samp>pclmul</samp>’</dt>
- <dt>‘<samp>no-pclmul</samp>’</dt>
- <dd><a name="index-target_0028_0022pclmul_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the PCLMUL instructions.
- </p>
- </dd>
- <dt>‘<samp>popcnt</samp>’</dt>
- <dt>‘<samp>no-popcnt</samp>’</dt>
- <dd><a name="index-target_0028_0022popcnt_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the POPCNT instruction.
- </p>
- </dd>
- <dt>‘<samp>sse</samp>’</dt>
- <dt>‘<samp>no-sse</samp>’</dt>
- <dd><a name="index-target_0028_0022sse_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the SSE instructions.
- </p>
- </dd>
- <dt>‘<samp>sse2</samp>’</dt>
- <dt>‘<samp>no-sse2</samp>’</dt>
- <dd><a name="index-target_0028_0022sse2_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the SSE2 instructions.
- </p>
- </dd>
- <dt>‘<samp>sse3</samp>’</dt>
- <dt>‘<samp>no-sse3</samp>’</dt>
- <dd><a name="index-target_0028_0022sse3_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the SSE3 instructions.
- </p>
- </dd>
- <dt>‘<samp>sse4</samp>’</dt>
- <dt>‘<samp>no-sse4</samp>’</dt>
- <dd><a name="index-target_0028_0022sse4_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the SSE4 instructions (both SSE4.1
- and SSE4.2).
- </p>
- </dd>
- <dt>‘<samp>sse4.1</samp>’</dt>
- <dt>‘<samp>no-sse4.1</samp>’</dt>
- <dd><a name="index-target_0028_0022sse4_002e1_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the sse4.1 instructions.
- </p>
- </dd>
- <dt>‘<samp>sse4.2</samp>’</dt>
- <dt>‘<samp>no-sse4.2</samp>’</dt>
- <dd><a name="index-target_0028_0022sse4_002e2_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the sse4.2 instructions.
- </p>
- </dd>
- <dt>‘<samp>sse4a</samp>’</dt>
- <dt>‘<samp>no-sse4a</samp>’</dt>
- <dd><a name="index-target_0028_0022sse4a_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the SSE4A instructions.
- </p>
- </dd>
- <dt>‘<samp>fma4</samp>’</dt>
- <dt>‘<samp>no-fma4</samp>’</dt>
- <dd><a name="index-target_0028_0022fma4_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the FMA4 instructions.
- </p>
- </dd>
- <dt>‘<samp>xop</samp>’</dt>
- <dt>‘<samp>no-xop</samp>’</dt>
- <dd><a name="index-target_0028_0022xop_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the XOP instructions.
- </p>
- </dd>
- <dt>‘<samp>lwp</samp>’</dt>
- <dt>‘<samp>no-lwp</samp>’</dt>
- <dd><a name="index-target_0028_0022lwp_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the LWP instructions.
- </p>
- </dd>
- <dt>‘<samp>ssse3</samp>’</dt>
- <dt>‘<samp>no-ssse3</samp>’</dt>
- <dd><a name="index-target_0028_0022ssse3_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the SSSE3 instructions.
- </p>
- </dd>
- <dt>‘<samp>cld</samp>’</dt>
- <dt>‘<samp>no-cld</samp>’</dt>
- <dd><a name="index-target_0028_0022cld_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the CLD before string moves.
- </p>
- </dd>
- <dt>‘<samp>fancy-math-387</samp>’</dt>
- <dt>‘<samp>no-fancy-math-387</samp>’</dt>
- <dd><a name="index-target_0028_0022fancy_002dmath_002d387_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the <code>sin</code>, <code>cos</code>, and
- <code>sqrt</code> instructions on the 387 floating-point unit.
- </p>
- </dd>
- <dt>‘<samp>ieee-fp</samp>’</dt>
- <dt>‘<samp>no-ieee-fp</samp>’</dt>
- <dd><a name="index-target_0028_0022ieee_002dfp_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of floating point that depends on IEEE arithmetic.
- </p>
- </dd>
- <dt>‘<samp>inline-all-stringops</samp>’</dt>
- <dt>‘<samp>no-inline-all-stringops</samp>’</dt>
- <dd><a name="index-target_0028_0022inline_002dall_002dstringops_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable inlining of string operations.
- </p>
- </dd>
- <dt>‘<samp>inline-stringops-dynamically</samp>’</dt>
- <dt>‘<samp>no-inline-stringops-dynamically</samp>’</dt>
- <dd><a name="index-target_0028_0022inline_002dstringops_002ddynamically_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of the inline code to do small string
- operations and calling the library routines for large operations.
- </p>
- </dd>
- <dt>‘<samp>align-stringops</samp>’</dt>
- <dt>‘<samp>no-align-stringops</samp>’</dt>
- <dd><a name="index-target_0028_0022align_002dstringops_0022_0029-function-attribute_002c-x86"></a>
- <p>Do/do not align destination of inlined string operations.
- </p>
- </dd>
- <dt>‘<samp>recip</samp>’</dt>
- <dt>‘<samp>no-recip</samp>’</dt>
- <dd><a name="index-target_0028_0022recip_0022_0029-function-attribute_002c-x86"></a>
- <p>Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS
- instructions followed an additional Newton-Raphson step instead of
- doing a floating-point division.
- </p>
- </dd>
- <dt>‘<samp>arch=<var>ARCH</var></samp>’</dt>
- <dd><a name="index-target_0028_0022arch_003dARCH_0022_0029-function-attribute_002c-x86"></a>
- <p>Specify the architecture to generate code for in compiling the function.
- </p>
- </dd>
- <dt>‘<samp>tune=<var>TUNE</var></samp>’</dt>
- <dd><a name="index-target_0028_0022tune_003dTUNE_0022_0029-function-attribute_002c-x86"></a>
- <p>Specify the architecture to tune for in compiling the function.
- </p>
- </dd>
- <dt>‘<samp>fpmath=<var>FPMATH</var></samp>’</dt>
- <dd><a name="index-target_0028_0022fpmath_003dFPMATH_0022_0029-function-attribute_002c-x86"></a>
- <p>Specify which floating-point unit to use. You must specify the
- <code>target("fpmath=sse,387")</code> option as
- <code>target("fpmath=sse+387")</code> because the comma would separate
- different options.
- </p>
- </dd>
- <dt>‘<samp>indirect_branch("<var>choice</var>")</samp>’</dt>
- <dd><a name="index-indirect_005fbranch-function-attribute_002c-x86"></a>
- <p>On x86 targets, the <code>indirect_branch</code> attribute causes the compiler
- to convert indirect call and jump with <var>choice</var>. ‘<samp>keep</samp>’
- keeps indirect call and jump unmodified. ‘<samp>thunk</samp>’ converts indirect
- call and jump to call and return thunk. ‘<samp>thunk-inline</samp>’ converts
- indirect call and jump to inlined call and return thunk.
- ‘<samp>thunk-extern</samp>’ converts indirect call and jump to external call
- and return thunk provided in a separate object file.
- </p>
- </dd>
- <dt>‘<samp>function_return("<var>choice</var>")</samp>’</dt>
- <dd><a name="index-function_005freturn-function-attribute_002c-x86"></a>
- <p>On x86 targets, the <code>function_return</code> attribute causes the compiler
- to convert function return with <var>choice</var>. ‘<samp>keep</samp>’ keeps function
- return unmodified. ‘<samp>thunk</samp>’ converts function return to call and
- return thunk. ‘<samp>thunk-inline</samp>’ converts function return to inlined
- call and return thunk. ‘<samp>thunk-extern</samp>’ converts function return to
- external call and return thunk provided in a separate object file.
- </p></dd>
- </dl>
- <p>On the x86, the inliner does not inline a
- function that has different target options than the caller, unless the
- callee has a subset of the target options of the caller. For example
- a function declared with <code>target("sse3")</code> can inline a function
- with <code>target("sse2")</code>, since <code>-msse3</code> implies <code>-msse2</code>.
- </p></dd>
- </dl>
- <hr>
- <div class="header">
- <p>
- 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> [<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>
- </div>
- </body>
- </html>
|