summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/nios-ii-function-attributes.html
blob: 76a38d7621f1ef27e582a5cd3de9088a7855cd4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div class="subsection-level-extent" id="Nios-II-Function-Attributes"> <div class="nav-panel"> <p> Next: <a href="nvidia-ptx-function-attributes" accesskey="n" rel="next">Nvidia PTX Function Attributes</a>, Previous: <a href="nds32-function-attributes" accesskey="p" rel="prev">NDS32 Function Attributes</a>, Up: <a href="function-attributes" accesskey="u" rel="up">Declaring Attributes of Functions</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div>  <h1 class="subsection" id="Nios-II-Function-Attributes-1"><span>6.33.22 Nios II Function Attributes<a class="copiable-link" href="#Nios-II-Function-Attributes-1"> ¶</a></span></h1> <p>These function attributes are supported by the Nios II back end: </p> <dl class="table"> <dt>
<span><code class="code">target (<var class="var">options</var>)</code><a class="copiable-link" href="#index-target-function-attribute-2"> ¶</a></span>
</dt> <dd>
<p>As discussed in <a class="ref" href="common-function-attributes">Common Function Attributes</a>, this attribute allows specification of target-specific compilation options. </p> <p>When compiling for Nios II, the following options are allowed: </p> <dl class="table"> <dt>
 <span>‘<samp class="samp">custom-<var class="var">insn</var>=<var class="var">N</var></samp>’<a class="copiable-link" href="#index-target_0028_0022custom-insn_003dN_0022_0029-function-attribute_002c-Nios-II"> ¶</a></span>
</dt> <dt>‘<samp class="samp">no-custom-<var class="var">insn</var></samp>’</dt> <dd>
<p>Each ‘<samp class="samp">custom-<var class="var">insn</var>=<var class="var">N</var></samp>’ attribute locally enables use of a custom instruction with encoding <var class="var">N</var> when generating code that uses <var class="var">insn</var>. Similarly, ‘<samp class="samp">no-custom-<var class="var">insn</var></samp>’ locally inhibits use of the custom instruction <var class="var">insn</var>. These target attributes correspond to the <samp class="option">-mcustom-<var class="var">insn</var>=<var class="var">N</var></samp> and <samp class="option">-mno-custom-<var class="var">insn</var></samp> command-line options, and support the same set of <var class="var">insn</var> keywords. See <a class="xref" href="nios-ii-options">Nios II Options</a>, for more information. </p> </dd> <dt>
<span>‘<samp class="samp">custom-fpu-cfg=<var class="var">name</var></samp>’<a class="copiable-link" href="#index-target_0028_0022custom-fpu-cfg_003dname_0022_0029-function-attribute_002c-Nios-II"> ¶</a></span>
</dt> <dd><p>This attribute corresponds to the <samp class="option">-mcustom-fpu-cfg=<var class="var">name</var></samp> command-line option, to select a predefined set of custom instructions named <var class="var">name</var>. See <a class="xref" href="nios-ii-options">Nios II Options</a>, for more information. </p></dd> </dl> </dd> </dl> </div><div class="_attribution">
  <p class="_attribution-p">
    &copy; Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br>
    <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Nios-II-Function-Attributes.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Nios-II-Function-Attributes.html</a>
  </p>
</div>