summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/nds32-function-attributes.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/gcc~13/nds32-function-attributes.html')
-rw-r--r--devdocs/gcc~13/nds32-function-attributes.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/devdocs/gcc~13/nds32-function-attributes.html b/devdocs/gcc~13/nds32-function-attributes.html
new file mode 100644
index 00000000..9af4ee7f
--- /dev/null
+++ b/devdocs/gcc~13/nds32-function-attributes.html
@@ -0,0 +1,24 @@
+<div class="subsection-level-extent" id="NDS32-Function-Attributes"> <div class="nav-panel"> <p> Next: <a href="nios-ii-function-attributes" accesskey="n" rel="next">Nios II Function Attributes</a>, Previous: <a href="msp430-function-attributes" accesskey="p" rel="prev">MSP430 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="NDS32-Function-Attributes-1"><span>6.33.21 NDS32 Function Attributes<a class="copiable-link" href="#NDS32-Function-Attributes-1"> ¶</a></span></h1> <p>These function attributes are supported by the NDS32 back end: </p> <dl class="table"> <dt>
+ <span><code class="code">exception</code><a class="copiable-link" href="#index-exception-function-attribute"> ¶</a></span>
+</dt> <dd>
+<p>Use this attribute on the NDS32 target to indicate that the specified function is an exception handler. The compiler will generate corresponding sections for use in an exception handler. </p> </dd> <dt>
+<span><code class="code">interrupt</code><a class="copiable-link" href="#index-interrupt-function-attribute_002c-NDS32"> ¶</a></span>
+</dt> <dd>
+<p>On NDS32 target, this attribute indicates that the specified function is an interrupt handler. The compiler generates corresponding sections for use in an interrupt handler. You can use the following attributes to modify the behavior: </p>
+<dl class="table"> <dt>
+<span><code class="code">nested</code><a class="copiable-link" href="#index-nested-function-attribute_002c-NDS32"> ¶</a></span>
+</dt> <dd><p>This interrupt service routine is interruptible. </p></dd> <dt><code class="code">not_nested</code></dt> <dd><p>This interrupt service routine is not interruptible. </p></dd> <dt><code class="code">nested_ready</code></dt> <dd><p>This interrupt service routine is interruptible after <code class="code">PSW.GIE</code> (global interrupt enable) is set. This allows interrupt service routine to finish some short critical code before enabling interrupts. </p></dd> <dt><code class="code">save_all</code></dt> <dd><p>The system will help save all registers into stack before entering interrupt handler. </p></dd> <dt><code class="code">partial_save</code></dt> <dd><p>The system will help save caller registers into stack before entering interrupt handler. </p></dd> </dl> </dd> <dt>
+<span><code class="code">naked</code><a class="copiable-link" href="#index-naked-function-attribute_002c-NDS32"> ¶</a></span>
+</dt> <dd>
+<p>This attribute allows the compiler to construct the requisite function declaration, while allowing the body of the function to be assembly code. The specified function will not have prologue/epilogue sequences generated by the compiler. Only basic <code class="code">asm</code> statements can safely be included in naked functions (see <a class="pxref" href="basic-asm">Basic Asm — Assembler Instructions Without Operands</a>). While using extended <code class="code">asm</code> or a mixture of basic <code class="code">asm</code> and C code may appear to work, they cannot be depended upon to work reliably and are not supported. </p> </dd> <dt>
+ <span><code class="code">reset</code><a class="copiable-link" href="#index-reset-function-attribute_002c-NDS32"> ¶</a></span>
+</dt> <dd>
+<p>Use this attribute on the NDS32 target to indicate that the specified function is a reset handler. The compiler will generate corresponding sections for use in a reset handler. You can use the following attributes to provide extra exception handling: </p>
+<dl class="table"> <dt>
+<span><code class="code">nmi</code><a class="copiable-link" href="#index-nmi-function-attribute_002c-NDS32"> ¶</a></span>
+</dt> <dd><p>Provide a user-defined function to handle NMI exception. </p></dd> <dt><code class="code">warm</code></dt> <dd><p>Provide a user-defined function to handle warm reset exception. </p></dd> </dl> </dd> </dl> </div> <div class="nav-panel"> <p> Next: <a href="nios-ii-function-attributes">Nios II Function Attributes</a>, Previous: <a href="msp430-function-attributes">MSP430 Function Attributes</a>, Up: <a href="function-attributes">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><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/NDS32-Function-Attributes.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/NDS32-Function-Attributes.html</a>
+ </p>
+</div>