blob: f1461883f8e9200c8391f162396c7a2c6eab47fb [file]
<html lang="en">
<head>
<title>RX Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
<link rel="prev" href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html#PowerPC-AltiVec_002fVSX-Built_002din-Functions" title="PowerPC AltiVec/VSX Built-in Functions">
<link rel="next" href="S_002f390-System-z-Built_002din-Functions.html#S_002f390-System-z-Built_002din-Functions" title="S/390 System z Built-in Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="RX-Built-in-Functions"></a>
<a name="RX-Built_002din-Functions"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="S_002f390-System-z-Built_002din-Functions.html#S_002f390-System-z-Built_002din-Functions">S/390 System z Built-in Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html#PowerPC-AltiVec_002fVSX-Built_002din-Functions">PowerPC AltiVec/VSX Built-in Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
<hr>
</div>
<h4 class="subsection">6.56.16 RX Built-in Functions</h4>
<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:
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_brk</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fbrk-3416"></a></var><br>
<blockquote><p>Generates the <code>brk</code> machine instruction.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_clrpsw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fclrpsw-3417"></a></var><br>
<blockquote><p>Generates the <code>clrpsw</code> machine instruction to clear the specified
bit in the processor status word.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_int</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fint-3418"></a></var><br>
<blockquote><p>Generates the <code>int</code> machine instruction to generate an interrupt
with the specified value.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_machi</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmachi-3419"></a></var><br>
<blockquote><p>Generates the <code>machi</code> machine instruction to add the result of
multiplying the top 16 bits of the two arguments into the
accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_maclo</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmaclo-3420"></a></var><br>
<blockquote><p>Generates the <code>maclo</code> machine instruction to add the result of
multiplying the bottom 16 bits of the two arguments into the
accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_mulhi</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmulhi-3421"></a></var><br>
<blockquote><p>Generates the <code>mulhi</code> machine instruction to place the result of
multiplying the top 16 bits of the two arguments into the
accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_mullo</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmullo-3422"></a></var><br>
<blockquote><p>Generates the <code>mullo</code> machine instruction to place the result of
multiplying the bottom 16 bits of the two arguments into the
accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: int <b>__builtin_rx_mvfachi</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvfachi-3423"></a></var><br>
<blockquote><p>Generates the <code>mvfachi</code> machine instruction to read the top
32 bits of the accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: int <b>__builtin_rx_mvfacmi</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvfacmi-3424"></a></var><br>
<blockquote><p>Generates the <code>mvfacmi</code> machine instruction to read the middle
32 bits of the accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: int <b>__builtin_rx_mvfc</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvfc-3425"></a></var><br>
<blockquote><p>Generates the <code>mvfc</code> machine instruction which reads the control
register specified in its argument and returns its value.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_mvtachi</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtachi-3426"></a></var><br>
<blockquote><p>Generates the <code>mvtachi</code> machine instruction to set the top
32 bits of the accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_mvtaclo</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtaclo-3427"></a></var><br>
<blockquote><p>Generates the <code>mvtaclo</code> machine instruction to set the bottom
32 bits of the accumulator.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_mvtc</b> (<var>int reg, int val</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtc-3428"></a></var><br>
<blockquote><p>Generates the <code>mvtc</code> machine instruction which sets control
register number <code>reg</code> to <code>val</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_mvtipl</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtipl-3429"></a></var><br>
<blockquote><p>Generates the <code>mvtipl</code> machine instruction set the interrupt
priority level.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_racw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fracw-3430"></a></var><br>
<blockquote><p>Generates the <code>racw</code> machine instruction to round the accumulator
according to the specified mode.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: int <b>__builtin_rx_revw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005frevw-3431"></a></var><br>
<blockquote><p>Generates the <code>revw</code> machine instruction which swaps the bytes in
the argument so that bits 0&ndash;7 now occupy bits 8&ndash;15 and vice versa,
and also bits 16&ndash;23 occupy bits 24&ndash;31 and vice versa.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_rmpa</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005frmpa-3432"></a></var><br>
<blockquote><p>Generates the <code>rmpa</code> machine instruction which initiates a
repeated multiply and accumulate sequence.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_round</b> (<var>float</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fround-3433"></a></var><br>
<blockquote><p>Generates the <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></blockquote></div>
<div class="defun">
&mdash; Built-in Function: int <b>__builtin_rx_sat</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fsat-3434"></a></var><br>
<blockquote><p>Generates the <code>sat</code> machine instruction which returns the
saturated value of the argument.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_setpsw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fsetpsw-3435"></a></var><br>
<blockquote><p>Generates the <code>setpsw</code> machine instruction to set the specified
bit in the processor status word.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_rx_wait</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fwait-3436"></a></var><br>
<blockquote><p>Generates the <code>wait</code> machine instruction.
</p></blockquote></div>
</body></html>