blob: b130f2219ffcf81b35f21d92f7c179601dcdb116 (
plain)
1
2
3
4
5
6
7
8
|
<div class="subsection-level-extent" id="MSP430-Built-in-Functions"> <div class="nav-panel"> <p> Next: <a href="nds32-built-in-functions" accesskey="n" rel="next">NDS32 Built-in Functions</a>, Previous: <a href="other-mips-built-in-functions" accesskey="p" rel="prev">Other MIPS Built-in Functions</a>, Up: <a href="target-builtins" accesskey="u" rel="up">Built-in Functions Specific to Particular Target Machines</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="MSP430-Built-in-Functions-1"><span>6.60.20 MSP430 Built-in Functions<a class="copiable-link" href="#MSP430-Built-in-Functions-1"> ¶</a></span></h1> <p>GCC provides a couple of special builtin functions to aid in the writing of interrupt handlers in C. </p> <dl class="table"> <dt><code class="code">__bic_SR_register_on_exit (int <var class="var">mask</var>)</code></dt> <dd>
<p>This clears the indicated bits in the saved copy of the status register currently residing on the stack. This only works inside interrupt handlers and the changes to the status register will only take affect once the handler returns. </p> </dd> <dt><code class="code">__bis_SR_register_on_exit (int <var class="var">mask</var>)</code></dt> <dd>
<p>This sets the indicated bits in the saved copy of the status register currently residing on the stack. This only works inside interrupt handlers and the changes to the status register will only take affect once the handler returns. </p> </dd> <dt><code class="code">__delay_cycles (long long <var class="var">cycles</var>)</code></dt> <dd><p>This inserts an instruction sequence that takes exactly <var class="var">cycles</var> cycles (between 0 and about 17E9) to complete. The inserted sequence may use jumps, loops, or no-ops, and does not interfere with any other instructions. Note that <var class="var">cycles</var> must be a compile-time constant integer - that is, you must pass a number, not a variable that may be optimized to a constant later. The number of cycles delayed by this builtin is exact. </p></dd> </dl> </div><div class="_attribution">
<p class="_attribution-p">
© 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/MSP430-Built-in-Functions.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/MSP430-Built-in-Functions.html</a>
</p>
</div>
|