blob: 1d6bce8edb580ac1061f183f5abf7a2e2be77ffc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<div class="subsection-level-extent" id="RX-Built-in-Functions"> <div class="nav-panel"> <p> Next: <a href="s_002f390-system-z-built-in-functions" accesskey="n" rel="next">S/390 System z Built-in Functions</a>, Previous: <a href="risc-v-vector-intrinsics" accesskey="p" rel="prev">RISC-V Vector Intrinsics</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="RX-Built-in-Functions-1"><span>6.60.30 RX Built-in Functions<a class="copiable-link" href="#RX-Built-in-Functions-1"> ¶</a></span></h1> <p>GCC supports some of the RX instructions which cannot be expressed in the C programming language via the use of built-in functions. The following functions are supported: </p> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fbrk">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_brk</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fbrk"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">brk</code> machine instruction. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fclrpsw">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_clrpsw</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fclrpsw"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">clrpsw</code> machine instruction to clear the specified bit in the processor status word. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fint">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_int</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fint"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">int</code> machine instruction to generate an interrupt with the specified value. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmachi">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_machi</strong> <code class="def-code-arguments">(int, int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmachi"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">machi</code> machine instruction to add the result of multiplying the top 16 bits of the two arguments into the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmaclo">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_maclo</strong> <code class="def-code-arguments">(int, int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmaclo"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">maclo</code> machine instruction to add the result of multiplying the bottom 16 bits of the two arguments into the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmulhi">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_mulhi</strong> <code class="def-code-arguments">(int, int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmulhi"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mulhi</code> machine instruction to place the result of multiplying the top 16 bits of the two arguments into the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmullo">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_mullo</strong> <code class="def-code-arguments">(int, int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmullo"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mullo</code> machine instruction to place the result of multiplying the bottom 16 bits of the two arguments into the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvfachi">
<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_rx_mvfachi</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvfachi"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvfachi</code> machine instruction to read the top 32 bits of the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvfacmi">
<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_rx_mvfacmi</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvfacmi"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvfacmi</code> machine instruction to read the middle 32 bits of the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvfc">
<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_rx_mvfc</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvfc"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvfc</code> machine instruction which reads the control register specified in its argument and returns its value. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvtachi">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_mvtachi</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvtachi"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvtachi</code> machine instruction to set the top 32 bits of the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvtaclo">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_mvtaclo</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvtaclo"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvtaclo</code> machine instruction to set the bottom 32 bits of the accumulator. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvtc">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_mvtc</strong> <code class="def-code-arguments">(int reg, int val)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvtc"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvtc</code> machine instruction which sets control register number <code class="code">reg</code> to <code class="code">val</code>. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fmvtipl">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_mvtipl</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fmvtipl"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">mvtipl</code> machine instruction set the interrupt priority level. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fracw">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_racw</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fracw"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">racw</code> machine instruction to round the accumulator according to the specified mode. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005frevw">
<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_rx_revw</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005frevw"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">revw</code> machine instruction which swaps the bytes in the argument so that bits 0–7 now occupy bits 8–15 and vice versa, and also bits 16–23 occupy bits 24–31 and vice versa. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005frmpa">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_rmpa</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005frmpa"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">rmpa</code> machine instruction which initiates a repeated multiply and accumulate sequence. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fround">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_round</strong> <code class="def-code-arguments">(float)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fround"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">round</code> machine instruction which returns the floating-point argument rounded according to the current rounding mode set in the floating-point status word register. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fsat">
<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_rx_sat</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fsat"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">sat</code> machine instruction which returns the saturated value of the argument. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fsetpsw">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_setpsw</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fsetpsw"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">setpsw</code> machine instruction to set the specified bit in the processor status word. </p></dd>
</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005frx_005fwait">
<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_rx_wait</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005frx_005fwait"> ¶</a></span>
</dt> <dd><p>Generates the <code class="code">wait</code> machine instruction. </p></dd>
</dl> </div> <div class="nav-panel"> <p> Next: <a href="s_002f390-system-z-built-in-functions">S/390 System z Built-in Functions</a>, Previous: <a href="risc-v-vector-intrinsics">RISC-V Vector Intrinsics</a>, Up: <a href="target-builtins">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><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/RX-Built-in-Functions.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/RX-Built-in-Functions.html</a>
</p>
</div>
|