blob: cbf046d01d39d17c3fcb2b932d7e30bad4d333b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<div class="subsection-level-extent" id="PRU-Built-in-Functions"> <div class="nav-panel"> <p> Next: <a href="risc-v-built-in-functions" accesskey="n" rel="next">RISC-V Built-in Functions</a>, Previous: <a href="powerpc-matrix-multiply-assist-built-in-functions" accesskey="p" rel="prev">PowerPC Matrix-Multiply Assist 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="PRU-Built-in-Functions-1"><span>6.60.27 PRU Built-in Functions<a class="copiable-link" href="#PRU-Built-in-Functions-1"> ¶</a></span></h1> <p>GCC provides a couple of special builtin functions to aid in utilizing special PRU instructions. </p> <p>The built-in functions supported are: </p> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fdelay_005fcycles">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__delay_cycles</strong> <code class="def-code-arguments">(constant long long <var class="var">cycles</var>)</code><a class="copiable-link" href="#index-_005f_005fdelay_005fcycles"> ¶</a></span>
</dt> <dd><p>This inserts an instruction sequence that takes exactly <var class="var">cycles</var> cycles (between 0 and 0xffffffff) 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> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fhalt">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__halt</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fhalt"> ¶</a></span>
</dt> <dd><p>This inserts a HALT instruction to stop processor execution. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005flmbd">
<span class="category-def">Built-in Function: </span><span><code class="def-type">unsigned int</code> <strong class="def-name">__lmbd</strong> <code class="def-code-arguments">(unsigned int <var class="var">wordval</var>, unsigned int <var class="var">bitval</var>)</code><a class="copiable-link" href="#index-_005f_005flmbd"> ¶</a></span>
</dt> <dd><p>This inserts LMBD instruction to calculate the left-most bit with value <var class="var">bitval</var> in value <var class="var">wordval</var>. Only the least significant bit of <var class="var">bitval</var> is taken into account. </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/PRU-Built-in-Functions.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/PRU-Built-in-Functions.html</a>
</p>
</div>
|