1<html lang="en"> 2<head> 3<title>RX Built-in Functions - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins"> 9<link rel="prev" href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html#PowerPC-AltiVec_002fVSX-Built_002din-Functions" title="PowerPC AltiVec/VSX Built-in Functions"> 10<link rel="next" href="SPARC-VIS-Built_002din-Functions.html#SPARC-VIS-Built_002din-Functions" title="SPARC VIS Built-in Functions"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="RX-Built-in-Functions"></a> 51<a name="RX-Built_002din-Functions"></a> 52<p> 53Next: <a rel="next" accesskey="n" href="SPARC-VIS-Built_002din-Functions.html#SPARC-VIS-Built_002din-Functions">SPARC VIS Built-in Functions</a>, 54Previous: <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>, 55Up: <a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a> 56<hr> 57</div> 58 59<h4 class="subsection">6.54.13 RX Built-in Functions</h4> 60 61<p>GCC supports some of the RX instructions which cannot be expressed in 62the C programming language via the use of built-in functions. The 63following functions are supported: 64 65<div class="defun"> 66— Built-in Function: void <b>__builtin_rx_brk</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fbrk-3190"></a></var><br> 67<blockquote><p>Generates the <code>brk</code> machine instruction. 68</p></blockquote></div> 69 70<div class="defun"> 71— Built-in Function: void <b>__builtin_rx_clrpsw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fclrpsw-3191"></a></var><br> 72<blockquote><p>Generates the <code>clrpsw</code> machine instruction to clear the specified 73bit in the processor status word. 74</p></blockquote></div> 75 76<div class="defun"> 77— Built-in Function: void <b>__builtin_rx_int</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fint-3192"></a></var><br> 78<blockquote><p>Generates the <code>int</code> machine instruction to generate an interrupt 79with the specified value. 80</p></blockquote></div> 81 82<div class="defun"> 83— Built-in Function: void <b>__builtin_rx_machi</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmachi-3193"></a></var><br> 84<blockquote><p>Generates the <code>machi</code> machine instruction to add the result of 85multiplying the top 16-bits of the two arguments into the 86accumulator. 87</p></blockquote></div> 88 89<div class="defun"> 90— Built-in Function: void <b>__builtin_rx_maclo</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmaclo-3194"></a></var><br> 91<blockquote><p>Generates the <code>maclo</code> machine instruction to add the result of 92multiplying the bottom 16-bits of the two arguments into the 93accumulator. 94</p></blockquote></div> 95 96<div class="defun"> 97— Built-in Function: void <b>__builtin_rx_mulhi</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmulhi-3195"></a></var><br> 98<blockquote><p>Generates the <code>mulhi</code> machine instruction to place the result of 99multiplying the top 16-bits of the two arguments into the 100accumulator. 101</p></blockquote></div> 102 103<div class="defun"> 104— Built-in Function: void <b>__builtin_rx_mullo</b> (<var>int, int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmullo-3196"></a></var><br> 105<blockquote><p>Generates the <code>mullo</code> machine instruction to place the result of 106multiplying the bottom 16-bits of the two arguments into the 107accumulator. 108</p></blockquote></div> 109 110<div class="defun"> 111— Built-in Function: int <b>__builtin_rx_mvfachi</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvfachi-3197"></a></var><br> 112<blockquote><p>Generates the <code>mvfachi</code> machine instruction to read the top 11332-bits of the accumulator. 114</p></blockquote></div> 115 116<div class="defun"> 117— Built-in Function: int <b>__builtin_rx_mvfacmi</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvfacmi-3198"></a></var><br> 118<blockquote><p>Generates the <code>mvfacmi</code> machine instruction to read the middle 11932-bits of the accumulator. 120</p></blockquote></div> 121 122<div class="defun"> 123— Built-in Function: int <b>__builtin_rx_mvfc</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvfc-3199"></a></var><br> 124<blockquote><p>Generates the <code>mvfc</code> machine instruction which reads the control 125register specified in its argument and returns its value. 126</p></blockquote></div> 127 128<div class="defun"> 129— Built-in Function: void <b>__builtin_rx_mvtachi</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtachi-3200"></a></var><br> 130<blockquote><p>Generates the <code>mvtachi</code> machine instruction to set the top 13132-bits of the accumulator. 132</p></blockquote></div> 133 134<div class="defun"> 135— Built-in Function: void <b>__builtin_rx_mvtaclo</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtaclo-3201"></a></var><br> 136<blockquote><p>Generates the <code>mvtaclo</code> machine instruction to set the bottom 13732-bits of the accumulator. 138</p></blockquote></div> 139 140<div class="defun"> 141— 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-3202"></a></var><br> 142<blockquote><p>Generates the <code>mvtc</code> machine instruction which sets control 143register number <code>reg</code> to <code>val</code>. 144</p></blockquote></div> 145 146<div class="defun"> 147— Built-in Function: void <b>__builtin_rx_mvtipl</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fmvtipl-3203"></a></var><br> 148<blockquote><p>Generates the <code>mvtipl</code> machine instruction set the interrupt 149priority level. 150</p></blockquote></div> 151 152<div class="defun"> 153— Built-in Function: void <b>__builtin_rx_racw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fracw-3204"></a></var><br> 154<blockquote><p>Generates the <code>racw</code> machine instruction to round the accumulator 155according to the specified mode. 156</p></blockquote></div> 157 158<div class="defun"> 159— Built-in Function: int <b>__builtin_rx_revw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005frevw-3205"></a></var><br> 160<blockquote><p>Generates the <code>revw</code> machine instruction which swaps the bytes in 161the argument so that bits 0–7 now occupy bits 8–15 and vice versa, 162and also bits 16–23 occupy bits 24–31 and vice versa. 163</p></blockquote></div> 164 165<div class="defun"> 166— Built-in Function: void <b>__builtin_rx_rmpa</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005frmpa-3206"></a></var><br> 167<blockquote><p>Generates the <code>rmpa</code> machine instruction which initiates a 168repeated multiply and accumulate sequence. 169</p></blockquote></div> 170 171<div class="defun"> 172— Built-in Function: void <b>__builtin_rx_round</b> (<var>float</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fround-3207"></a></var><br> 173<blockquote><p>Generates the <code>round</code> machine instruction which returns the 174floating point argument rounded according to the current rounding mode 175set in the floating point status word register. 176</p></blockquote></div> 177 178<div class="defun"> 179— Built-in Function: int <b>__builtin_rx_sat</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fsat-3208"></a></var><br> 180<blockquote><p>Generates the <code>sat</code> machine instruction which returns the 181saturated value of the argument. 182</p></blockquote></div> 183 184<div class="defun"> 185— Built-in Function: void <b>__builtin_rx_setpsw</b> (<var>int</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fsetpsw-3209"></a></var><br> 186<blockquote><p>Generates the <code>setpsw</code> machine instruction to set the specified 187bit in the processor status word. 188</p></blockquote></div> 189 190<div class="defun"> 191— Built-in Function: void <b>__builtin_rx_wait</b> (<var>void</var>)<var><a name="index-g_t_005f_005fbuiltin_005frx_005fwait-3210"></a></var><br> 192<blockquote><p>Generates the <code>wait</code> machine instruction. 193</p></blockquote></div> 194 195 </body></html> 196 197