summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/m32r_002fd-function-attributes.html
blob: e10b7eec5be18a137049fa1de0e463a0c2cb17c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<div class="subsection-level-extent" id="M32R_002fD-Function-Attributes"> <div class="nav-panel"> <p> Next: <a href="m68k-function-attributes" accesskey="n" rel="next">m68k Function Attributes</a>, Previous: <a href="m32c-function-attributes" accesskey="p" rel="prev">M32C 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="M32R_002fD-Function-Attributes-1"><span>6.33.14 M32R/D Function Attributes<a class="copiable-link" href="#M32R_002fD-Function-Attributes-1"> ¶</a></span></h1> <p>These function attributes are supported by the M32R/D back end: </p> <dl class="table"> <dt>
<span><code class="code">interrupt</code><a class="copiable-link" href="#index-interrupt-function-attribute_002c-M32R_002fD"> ¶</a></span>
</dt> <dd>
<p>Use this attribute to indicate that the specified function is an interrupt handler. The compiler generates function entry and exit sequences suitable for use in an interrupt handler when this attribute is present. </p> </dd> <dt>
 <span><code class="code">model (<var class="var">model-name</var>)</code><a class="copiable-link" href="#index-model-function-attribute_002c-M32R_002fD"> ¶</a></span>
</dt> <dd> <p>On the M32R/D, use this attribute to set the addressability of an object, and of the code generated for a function. The identifier <var class="var">model-name</var> is one of <code class="code">small</code>, <code class="code">medium</code>, or <code class="code">large</code>, representing each of the code models. </p> <p>Small model objects live in the lower 16MB of memory (so that their addresses can be loaded with the <code class="code">ld24</code> instruction), and are callable with the <code class="code">bl</code> instruction. </p> <p>Medium model objects may live anywhere in the 32-bit address space (the compiler generates <code class="code">seth/add3</code> instructions to load their addresses), and are callable with the <code class="code">bl</code> instruction. </p> <p>Large model objects may live anywhere in the 32-bit address space (the compiler generates <code class="code">seth/add3</code> instructions to load their addresses), and may not be reachable with the <code class="code">bl</code> instruction (the compiler generates the much slower <code class="code">seth/add3/jl</code> instruction sequence). </p>
</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/M32R_002fD-Function-Attributes.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/M32R_002fD-Function-Attributes.html</a>
  </p>
</div>