blob: 66019bed2580f632110671682a424f781830c655 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1988-2015 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. -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Compiler Collection (GCC) Internals: RTL</title>
<meta name="description" content="GNU Compiler Collection (GCC) Internals: RTL">
<meta name="keywords" content="GNU Compiler Collection (GCC) Internals: RTL">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="RTL-Objects.html#RTL-Objects" rel="next" title="RTL Objects">
<link href="Memory-model.html#Memory-model" rel="prev" title="Memory model">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="RTL"></a>
<div class="header">
<p>
Next: <a href="Control-Flow.html#Control-Flow" accesskey="n" rel="next">Control Flow</a>, Previous: <a href="Tree-SSA.html#Tree-SSA" accesskey="p" rel="prev">Tree SSA</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="RTL-Representation"></a>
<h2 class="chapter">13 RTL Representation</h2>
<a name="index-RTL-representation"></a>
<a name="index-representation-of-RTL"></a>
<a name="index-Register-Transfer-Language-_0028RTL_0029"></a>
<p>The last part of the compiler work is done on a low-level intermediate
representation called Register Transfer Language. In this language, the
instructions to be output are described, pretty much one by one, in an
algebraic form that describes what the instruction does.
</p>
<p>RTL is inspired by Lisp lists. It has both an internal form, made up of
structures that point at other structures, and a textual form that is used
in the machine description and in printed debugging dumps. The textual
form uses nested parentheses to indicate the pointers in the internal form.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="RTL-Objects.html#RTL-Objects" accesskey="1">RTL Objects</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions vs vectors vs strings vs integers.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="RTL-Classes.html#RTL-Classes" accesskey="2">RTL Classes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Categories of RTL expression objects, and their structure.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Accessors.html#Accessors" accesskey="3">Accessors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Macros to access expression operands or vector elts.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Special-Accessors.html#Special-Accessors" accesskey="4">Special Accessors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Macros to access specific annotations on RTL.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Flags.html#Flags" accesskey="5">Flags</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Other flags in an RTL expression.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Machine-Modes.html#Machine-Modes" accesskey="6">Machine Modes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Describing the size and format of a datum.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Constants.html#Constants" accesskey="7">Constants</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions with constant values.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Regs-and-Memory.html#Regs-and-Memory" accesskey="8">Regs and Memory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions representing register contents or memory.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Arithmetic.html#Arithmetic" accesskey="9">Arithmetic</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions representing arithmetic on other expressions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Comparisons.html#Comparisons">Comparisons</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions representing comparison of expressions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Bit_002dFields.html#Bit_002dFields">Bit-Fields</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions representing bit-fields in memory or reg.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Vector-Operations.html#Vector-Operations">Vector Operations</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions involving vector datatypes.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Conversions.html#Conversions">Conversions</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Extending, truncating, floating or fixing.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="RTL-Declarations.html#RTL-Declarations">RTL Declarations</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Declaring volatility, constancy, etc.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Side-Effects.html#Side-Effects">Side Effects</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions for storing in registers, etc.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Incdec.html#Incdec">Incdec</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Embedded side-effects for autoincrement addressing.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Assembler.html#Assembler">Assembler</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Representing <code>asm</code> with operands.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Debug-Information.html#Debug-Information">Debug Information</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expressions representing debugging information.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Insns.html#Insns">Insns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Expression types for entire insns.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Calls.html#Calls">Calls</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">RTL representation of function call insns.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Sharing.html#Sharing">Sharing</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Some expressions are unique; others *must* be copied.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Reading-RTL.html#Reading-RTL">Reading RTL</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Reading textual RTL from a file.
</td></tr>
</table>
<hr>
<div class="header">
<p>
Next: <a href="Control-Flow.html#Control-Flow" accesskey="n" rel="next">Control Flow</a>, Previous: <a href="Tree-SSA.html#Tree-SSA" accesskey="p" rel="prev">Tree SSA</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>