1. Break long lines to 80 col limit

2. Fix indentation
3. Renumber the instruction opcodes after the Shift became a binary operator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2007-02-02 02:30:19 +00:00
parent 832254e1c2
commit e1888eec10

View File

@@ -248,8 +248,8 @@ variable bit rate encoding as described above.</p>
</tr> </tr>
<tr> <tr>
<td><a name="uint64_vbr"><b>uint64_vbr</b></a></td> <td><a name="uint64_vbr"><b>uint64_vbr</b></a></td>
<td class="td_left">A 64-bit unsigned integer that occupies from one to ten <td class="td_left">A 64-bit unsigned integer that occupies from one to
bytes using variable bit rate encoding.</td> ten bytes using variable bit rate encoding.</td>
</tr> </tr>
<tr> <tr>
<td><a name="int64_vbr"><b>int64_vbr</b></a></td> <td><a name="int64_vbr"><b>int64_vbr</b></a></td>
@@ -262,58 +262,60 @@ variable bit rate encoding as described above.</p>
</tr> </tr>
<tr> <tr>
<td><a name="bit"><b>bit(n-m)</b></a></td> <td><a name="bit"><b>bit(n-m)</b></a></td>
<td class="td_left">A set of bit within some larger integer field. The values <td class="td_left">A set of bit within some larger integer field. The
of <code>n</code> and <code>m</code> specify the inclusive range of bits values of <code>n</code> and <code>m</code> specify the inclusive range
that define the subfield. The value for <code>m</code> may be omitted if of bits that define the subfield. The value for <code>m</code> may be
its the same as <code>n</code>.</td> omitted if its the same as <code>n</code>.</td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;"><b><a name="float"><b>float</b></a></b></td> <td style="vertical-align: top;"><b><a name="float"><b>float</b></a></b>
<td style="vertical-align: top; text-align: left;">A floating point value encoded </td>
as a 32-bit IEEE value written in little-endian form.<br> <td style="vertical-align: top; text-align: left;">A floating point
value encoded as a 32-bit IEEE value written in little-endian form.<br>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;"><b><b><a name="double"><b>double</b></a></b></b></td> <td style="vertical-align: top;"><b><b><a name="double"><b>double</b></a>
<td style="vertical-align: top; text-align: left;">A floating point value encoded </b></b></td>
as a64-bit IEEE value written in little-endian form</td> <td style="vertical-align: top; text-align: left;">A floating point value
encoded as a64-bit IEEE value written in little-endian form</td>
</tr> </tr>
<tr> <tr>
<td><a name="string"><b>string</b></a></td> <td><a name="string"><b>string</b></a></td>
<td class="td_left">A uint32_vbr indicating the type of the <td class="td_left">A uint32_vbr indicating the type of the constant
constant string which also includes its length, immediately followed by string which also includes its length, immediately followed by the
the characters of the string. There is no terminating null byte in the characters of the string. There is no terminating null byte in the
string.</td> string.</td>
</tr> </tr>
<tr> <tr>
<td><a name="data"><b>data</b></a></td> <td><a name="data"><b>data</b></a></td>
<td class="td_left">An arbitrarily long segment of data to which <td class="td_left">An arbitrarily long segment of data to which no
no interpretation is implied. This is used for constant initializers.<br> interpretation is implied. This is used for constant initializers.<br>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a name="llist"><b>llist(x)</b></a></td> <td><a name="llist"><b>llist(x)</b></a></td>
<td class="td_left">A length list of x. This means the list is <td class="td_left">A length list of x. This means the list is encoded
encoded as an <a href="#uint32_vbr">uint32_vbr</a> providing the as an <a href="#uint32_vbr">uint32_vbr</a> providing the length of the
length of the list, followed by a sequence of that many "x" items. This list, followed by a sequence of that many "x" items. This implies that
implies that the reader should iterate the number of times provided by the reader should iterate the number of times provided by the length.
the length.</td> </td>
</tr> </tr>
<tr> <tr>
<td><a name="zlist"><b>zlist(x)</b></a></td> <td><a name="zlist"><b>zlist(x)</b></a></td>
<td class="td_left">A zero-terminated list of x. This means the <td class="td_left">A zero-terminated list of x. This means the list is
list is encoded as a sequence of an indeterminate number of "x" items, encoded as a sequence of an indeterminate number of "x" items, followed
followed by an <a href="#uint32_vbr">uint32_vbr</a> terminating value. by an <a href="#uint32_vbr">uint32_vbr</a> terminating value. This
This implies that none of the "x" items can have a zero value (or else implies that none of the "x" items can have a zero value (or else the
the list terminates).</td> list terminates).</td>
</tr> </tr>
<tr> <tr>
<td><a name="block"><b>block</b></a></td> <td><a name="block"><b>block</b></a></td>
<td class="td_left">A block of data that is logically related. A <td class="td_left">A block of data that is logically related. A block
block is an unsigned 32-bit integer that encodes the type of the block is an unsigned 32-bit integer that encodes the type of the block in
in the low 5 bits and the size of the block in the high 27 bits. The the low 5 bits and the size of the block in the high 27 bits. The
length does not include the block header or any alignment bytes at the length does not include the block header or any alignment bytes at the
end of the block. Blocks may compose other blocks. </td> end of the block. Blocks may compose other blocks. </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -333,18 +335,18 @@ following table: </p>
</tr> </tr>
<tr> <tr>
<td><b><code>?</code></b></td> <td><b><code>?</code></b></td>
<td class="td_left">The question mark indicates 0 or 1 <td class="td_left">The question mark indicates 0 or 1 occurrences of
occurrences of the thing preceding it.</td> the thing preceding it.</td>
</tr> </tr>
<tr> <tr>
<td><b><code>*</code></b></td> <td><b><code>*</code></b></td>
<td class="td_left">The asterisk indicates 0 or more occurrences <td class="td_left">The asterisk indicates 0 or more occurrences of the
of the thing preceding it.</td> thing preceding it.</td>
</tr> </tr>
<tr> <tr>
<td><b><code>+</code></b></td> <td><b><code>+</code></b></td>
<td class="td_left">The plus sign indicates 1 or more occurrences <td class="td_left">The plus sign indicates 1 or more occurrences of the
of the thing preceding it.</td> thing preceding it.</td>
</tr> </tr>
<tr> <tr>
<td><b><code>()</code></b></td> <td><b><code>()</code></b></td>
@@ -369,8 +371,8 @@ of the thing preceding it.</td>
<ol> <ol>
<li>An optional string. Matches either nothing or a single string</li> <li>An optional string. Matches either nothing or a single string</li>
<li>One or more pairs of uint32_vbr.</li> <li>One or more pairs of uint32_vbr.</li>
<li>Zero or more occurrences of either an unsigned followed by a <li>Zero or more occurrences of either an unsigned followed by a uint32_vbr
uint32_vbr or just a uint32_vbr.</li> or just a uint32_vbr.</li>
<li>An optional length list of unsigned values.</li> <li>An optional length list of unsigned values.</li>
</ol> </ol>
</div> </div>
@@ -380,13 +382,14 @@ uint32_vbr or just a uint32_vbr.</li>
<p>The bytecode format uses the notion of a "slot" to reference Types <p>The bytecode format uses the notion of a "slot" to reference Types
and Values. Since the bytecode file is a <em>direct</em> representation of and Values. Since the bytecode file is a <em>direct</em> representation of
LLVM's intermediate representation, there is a need to represent pointers in LLVM's intermediate representation, there is a need to represent pointers in
the file. Slots are used for this purpose. For example, if one has the following the file. Slots are used for this purpose. For example, if one has the
assembly: following assembly:
</p> </p>
<div class="doc_code"><code> %MyType = type { int, sbyte }<br> <div class="doc_code"><code> %MyType = type { int, sbyte }<br>
%MyVar = external global %MyType %MyVar = external global %MyType
</code></div> </code></div>
<p>there are two definitions. The definition of <tt>%MyVar</tt> uses <tt>%MyType</tt>. <p>there are two definitions. The definition of <tt>%MyVar</tt> uses
<tt>%MyType</tt>.
In the C++ IR this linkage between <tt>%MyVar</tt> and <tt>%MyType</tt> In the C++ IR this linkage between <tt>%MyVar</tt> and <tt>%MyType</tt>
is explicit through the use of C++ pointers. In bytecode, however, there's no is explicit through the use of C++ pointers. In bytecode, however, there's no
ability to store memory addresses. Instead, we compute and write out ability to store memory addresses. Instead, we compute and write out
@@ -501,8 +504,8 @@ type constant pool, and symbol table for the function.</td>
<td>2</td> <td>2</td>
<td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a <td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href="#constantpool">Function&nbsp;Constant&nbsp;Pool</a></td> href="#constantpool">Function&nbsp;Constant&nbsp;Pool</a></td>
<td class="td_left">Any constants (including types) used solely <td class="td_left">Any constants (including types) used solely within
within the function are emitted here in the function constant pool. </td> the function are emitted here in the function constant pool. </td>
</tr> </tr>
<tr> <tr>
<td>0x07</td> <td>0x07</td>
@@ -512,9 +515,9 @@ within the function are emitted here in the function constant pool. </td>
<td>2</td> <td>2</td>
<td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a <td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href="#instructionlist">Instruction&nbsp;List</a></td> href="#instructionlist">Instruction&nbsp;List</a></td>
<td class="td_left">This block contains all the instructions of <td class="td_left">This block contains all the instructions of the
the function. The basic blocks are inferred by terminating function. The basic blocks are inferred by terminating instructions.
instructions. </td> </td>
</tr> </tr>
<tr> <tr>
<td>0x04</td> <td>0x04</td>
@@ -524,8 +527,8 @@ instructions. </td>
<td>2</td> <td>2</td>
<td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a <td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href="#symtab">Function&nbsp;Symbol&nbsp;Table</a></td> href="#symtab">Function&nbsp;Symbol&nbsp;Table</a></td>
<td class="td_left">This symbol table provides the names for the <td class="td_left">This symbol table provides the names for the function
function specific values used (basic block labels mostly).</td> specific values used (basic block labels mostly).</td>
</tr> </tr>
<tr> <tr>
<td>0x04</td> <td>0x04</td>
@@ -534,9 +537,9 @@ function specific values used (basic block labels mostly).</td>
<td>No</td> <td>No</td>
<td>1</td> <td>1</td>
<td class="td_left">&nbsp;&nbsp;&nbsp;<a href="#symtab">Module&nbsp;Symbol&nbsp;Table</a></td> <td class="td_left">&nbsp;&nbsp;&nbsp;<a href="#symtab">Module&nbsp;Symbol&nbsp;Table</a></td>
<td class="td_left">This symbol table provides the names for the <td class="td_left">This symbol table provides the names for the various
various entries in the file that are not function specific (global entries in the file that are not function specific (global vars, and
vars, and functions mostly).</td> functions mostly).</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -669,11 +672,11 @@ sections.</p>
blocks in a bytecode file. Specifically, instead of encoding the type and size blocks in a bytecode file. Specifically, instead of encoding the type and size
of the block into a 32-bit integer with 5-bits for type and 27-bits for size, of the block into a 32-bit integer with 5-bits for type and 27-bits for size,
the module block header uses two 32-bit unsigned values, one for type, and one the module block header uses two 32-bit unsigned values, one for type, and one
for size. While the 2<sup>27</sup> byte limit on block size is sufficient for the blocks for size. While the 2<sup>27</sup> byte limit on block size is sufficient
contained in the module, it isn't sufficient for the module block itself for the blocks contained in the module, it isn't sufficient for the module
because we want to ensure that bytecode files as large as 2<sup>32</sup> bytes block itself because we want to ensure that bytecode files as large as
are possible. For this reason, the module block (and only the module block) 2<sup>32</sup> bytes are possible. For this reason, the module block (and
uses a long format header.</p> only the module block) uses a long format header.</p>
</div> </div>
<!-- _______________________________________________________________________ --> <!-- _______________________________________________________________________ -->
@@ -744,17 +747,16 @@ types. They are encoded simply as their TypeID.</p>
</tr> </tr>
<tr> <tr>
<td><a href="#uint24_vbr">uint24_vbr</a></td> <td><a href="#uint24_vbr">uint24_vbr</a></td>
<td class="td_left">Type ID for the primitive types (values 1 to <td class="td_left">Type ID for the primitive types (values 1 to 11)
11) <sup>1</sup></td> <sup>1</sup></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
Notes: Notes:
<ol> <ol>
<li>The values for the Type IDs for the primitive types are provided <li>The values for the Type IDs for the primitive types are provided by the
by the definition of the <code>llvm::Type::TypeID</code> enumeration definition of the <code>llvm::Type::TypeID</code> enumeration in
in <code>include/llvm/Type.h</code>. The enumeration gives the <code>include/llvm/Type.h</code>. The enumeration gives the following mapping:
following mapping:
<ol> <ol>
<li>bool</li> <li>bool</li>
<li>ubyte</li> <li>ubyte</li>
@@ -791,8 +793,8 @@ following mapping:
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a>?</td> <td><a href="#uint32_vbr">uint32_vbr</a>?</td>
<td class="td_left">Value 0 if this is a varargs function, <td class="td_left">Value 0 if this is a varargs function, missing
missing otherwise.</td> otherwise.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -922,36 +924,36 @@ all functions. The format is shown in the table below:</p>
</tr> </tr>
<tr> <tr>
<td><a href="#zlist">zlist</a>(<a href="#globalvar">globalvar</a>)</td> <td><a href="#zlist">zlist</a>(<a href="#globalvar">globalvar</a>)</td>
<td class="td_left">A zero terminated list of global var <td class="td_left">A zero terminated list of global var definitions
definitions occurring in the module.</td> occurring in the module.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#zlist">zlist</a>(<a href="#funcfield">funcfield</a>)</td> <td><a href="#zlist">zlist</a>(<a href="#funcfield">funcfield</a>)</td>
<td class="td_left">A zero terminated list of function definitions <td class="td_left">A zero terminated list of function definitions
occurring in the module.</td> occurring in the module.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#llist">llist</a>(<a href="#string">string</a>)</td> <td><a href="#llist">llist</a>(<a href="#string">string</a>)</td>
<td class="td_left">A length list <td class="td_left">A length list of strings that specify the names of
of strings that specify the names of the libraries that this module the libraries that this module depends upon.</td>
depends upon.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#string">string</a></td> <td><a href="#string">string</a></td>
<td class="td_left">The target <td class="td_left">The target triple for the module (blank means no
triple for the module (blank means no target triple specified, i.e. a target triple specified, i.e. a platform-independent module).</td>
platform-independent module).</td>
</tr> </tr>
<tr> <tr>
<td><a href="#string">string</a></td> <td><a href="#string">string</a></td>
<td class="td_left">The data layout string describing the endianness, pointer size, and <td class="td_left">The data layout string describing the endianness,
type alignments for which the module was written (blank means no data layout specified, i.e. a platform-independent module).</td> pointer size, and type alignments for which the module was written
(blank means no data layout specified, i.e. a platform-independent
module).</td>
</tr> </tr>
<tr> <tr>
<td><a href="#llist">llist</a>(<a href="#string">string</a>)</td> <td><a href="#llist">llist</a>(<a href="#string">string</a>)</td>
<td class="td_left">A length list <td class="td_left">A length list of strings that defines a table of
of strings that defines a table of section strings for globals. A global's section strings for globals. A global's SectionID is an index into
SectionID is an index into this table.</td> this table.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#string">string</a></td> <td><a href="#string">string</a></td>
@@ -986,9 +988,8 @@ and a an optional initializers for the global var.</p>
</tr> </tr>
<tr> <tr>
<td><a href="#bit">bit(1)</a></td> <td><a href="#bit">bit(1)</a></td>
<td class="td_left">Has initializer? Note that this bit <td class="td_left">Has initializer? Note that this bit determines
determines whether the constant initializer field (described below) whether the constant initializer field (described below) follows.</td>
follows. </td>
</tr> </tr>
<tr> <tr>
<td><a href="#bit">bit(2-4)</a></td> <td><a href="#bit">bit(2-4)</a></td>
@@ -1056,9 +1057,9 @@ and can includes more information:</p>
</td> </td>
<td class="td_left">An optional section ID number, specifying the string <td class="td_left">An optional section ID number, specifying the string
to use for the section of the global. This an index (+1) of an entry to use for the section of the global. This an index (+1) of an entry
into the SectionID llist in the <a href="#globalinfo">Module Global into the SectionID llist in the
Info</a> block. If this value is 0 or not present, the global has an <a href="#globalinfo">Module Global Info</a> block. If this value is
empty section string.</td> 0 or not present, the global has an empty section string.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1108,11 +1109,11 @@ href="#uint32_vbr">uint32_vbr</a> that describes the function.</p>
<tr> <tr>
<td><a href="#bit">bit(4)</a></td> <td><a href="#bit">bit(4)</a></td>
<td class="td_left">If this bit is set to 1, the indicated function is <td class="td_left">If this bit is set to 1, the indicated function is
external, and there is no <a href="#functiondefs">Function Definiton external, and there is no
Block</a> in the bytecode file for the function. If the function is <a href="#functiondefs">Function Definiton Block</a> in the bytecode
external and has <tt>dllimport or extern_weak</tt> linkage additional file for the function. If the function is external and has
field in the extension word is used to indicate the actual linkage <tt>dllimport or extern_weak</tt> linkage additional field in the
type.</td> extension word is used to indicate the actual linkage type.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#bit">bit(5-30)</a></td> <td><a href="#bit">bit(5-30)</a></td>
@@ -1171,9 +1172,9 @@ follows with the following fields:</p>
</td> </td>
<td class="td_left">An optional section ID number, specifying the string <td class="td_left">An optional section ID number, specifying the string
to use for the section of the function. This an index (+1) of an entry to use for the section of the function. This an index (+1) of an entry
into the SectionID llist in the <a href="#globalinfo">Module Global into the SectionID llist in the
Info</a> block. If this value is 0 or not present, the function has an <a href="#globalinfo">Module Global Info</a> block. If this value is
empty section string.</td> 0 or not present, the function has an empty section string.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1218,15 +1219,15 @@ both function and module constant pools.</p>
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a></td> <td><a href="#uint32_vbr">uint32_vbr</a></td>
<td class="td_left">Zero. This identifies the following "plane" <td class="td_left">Zero. This identifies the following "plane" as
as containing the constant strings. This is needed to identify it containing the constant strings. This is needed to identify it uniquely
uniquely from other constant planes that follow. </td> from other constant planes that follow. </td>
</tr> </tr>
<tr> <tr>
<td><a href="#uint24_vbr">uint24_vbr</a>+</td> <td><a href="#uint24_vbr">uint24_vbr</a>+</td>
<td class="td_left">Type slot number of the constant string's type. <td class="td_left">Type slot number of the constant string's type. Note
Note that the constant string's type implicitly defines the length of that the constant string's type implicitly defines the length of the
the string. </td> string. </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1272,21 +1273,20 @@ constant is solely determined by its type. In this case, we have the following
field definitions, based on type:</p> field definitions, based on type:</p>
<ul> <ul>
<li><b>Bool</b>. This is written as an <a href="#uint32_vbr">uint32_vbr</a> <li><b>Bool</b>. This is written as an <a href="#uint32_vbr">uint32_vbr</a> of
of value 1U or 0U.</li> value 1U or 0U.</li>
<li><b>Signed Integers (sbyte,short,int,long)</b>. These are written <li><b>Signed Integers (sbyte,short,int,long)</b>. These are written as an
as an <a href="#int64_vbr">int64_vbr</a> with the corresponding value.</li> <a href="#int64_vbr">int64_vbr</a> with the corresponding value.</li>
<li><b>Unsigned Integers (ubyte,ushort,uint,ulong)</b>. These are <li><b>Unsigned Integers (ubyte,ushort,uint,ulong)</b>. These are written as
written as an <a href="#uint64_vbr">uint64_vbr</a> with the an <a href="#uint64_vbr">uint64_vbr</a> with the corresponding value. </li>
corresponding value. </li> <li><b>Floating Point</b>. Both the float and double types are written
<li><b>Floating Point</b>. Both the float and double types are literally in binary format.</li>
written literally in binary format.</li> <li><b>Arrays</b>. Arrays are written simply as a list of
<li><b>Arrays</b>. Arrays are written simply as a list of <a <a href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the
href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the constant constant element values.</li>
element values.</li> <li><b>Structures</b>. Structures are written simply as a list of
<li><b>Structures</b>. Structures are written simply as a list of <a <a href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the
href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the constant constant field values of the structure.</li>
field values of the structure.</li>
</ul> </ul>
</div> </div>
@@ -1350,18 +1350,18 @@ number of operands+1.</p>
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a></td> <td><a href="#uint32_vbr">uint32_vbr</a></td>
<td class="td_left">Op code of the instruction for the constant <td class="td_left">Op code of the instruction for the constant
expression.</td> expression.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a></td> <td><a href="#uint32_vbr">uint32_vbr</a></td>
<td class="td_left">The value slot number of the constant value for an <td class="td_left">The value slot number of the constant value for an
operand.<sup>1</sup></td> operand.<sup>1</sup></td>
</tr> </tr>
<tr> <tr>
<td><a href="#uint24_vbr">uint24_vbr</a></td> <td><a href="#uint24_vbr">uint24_vbr</a></td>
<td class="td_left">The type slot number for the type of the constant <td class="td_left">The type slot number for the type of the constant
value for an operand.<sup>1</sup></td> value for an operand.<sup>1</sup></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1391,24 +1391,25 @@ size<br>
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a></td> <td><a href="#uint32_vbr">uint32_vbr</a></td>
<td class="td_left"><a href="#funclinkage_and_visibility">The linkage and <td class="td_left">
visibility</a> style field</td> <a href="#funclinkage_and_visibility">The linkage and visibility</a>
style field</td>
</tr> </tr>
<tr> <tr>
<td><a href="#block">block</a></td> <td><a href="#block">block</a></td>
<td class="td_left">The <a href="#constantpool">constant pool</a> <td class="td_left">The <a href="#constantpool">constant pool</a> block
block for this function.<sup>2</sup></td> for this function.<sup>2</sup></td>
</tr> </tr>
<tr> <tr>
<td><a href="#block">block</a></td> <td><a href="#block">block</a></td>
<td class="td_left">The <a href="#instructionlist">instruction <td class="td_left">The <a href="#instructionlist">instruction list</a>
list</a> for the function.</td> for the function.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#block">block</a></td> <td><a href="#block">block</a></td>
<td class="td_left">The function's <a href="#symtab">symbol <td class="td_left">The function's <a href="#symtab">symbol table</a>
table</a> containing only those symbols pertinent to the function containing only those symbols pertinent to the function (mostly block
(mostly block labels).</td> labels).</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1433,7 +1434,8 @@ other fields will be present as the function is defined elsewhere.</li>
<tr> <tr>
<td><a href="#bit">bit(0-15)</a></td> <td><a href="#bit">bit(0-15)</a></td>
<td class="td_left">The linkage type of the function: 0=External, 1=Weak, <td class="td_left">The linkage type of the function: 0=External, 1=Weak,
2=Appending, 3=Internal, 4=LinkOnce, 5=DllImport, 6=DllExport<sup>1</sup></td> 2=Appending, 3=Internal, 4=LinkOnce, 5=DllImport,
6=DllExport<sup>1</sup></td>
</tr> </tr>
<tr> <tr>
<td><a href="#bit">bit(16-18)</a></td> <td><a href="#bit">bit(16-18)</a></td>
@@ -1467,8 +1469,8 @@ the block is given in the following table.</p>
</tr> </tr>
<tr> <tr>
<td><a href="#instruction">instruction</a>+</td> <td><a href="#instruction">instruction</a>+</td>
<td class="td_left">An instruction. Instructions have a variety <td class="td_left">An instruction. Instructions have a variety of
of formats. See <a href="#instruction">Instructions</a> for details.</td> formats. See <a href="#instruction">Instructions</a> for details.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1526,37 +1528,37 @@ possible. </p>
<tr><td>SRem</td><td>14</td><td>6</td><td>1.9</td></tr> <tr><td>SRem</td><td>14</td><td>6</td><td>1.9</td></tr>
<tr><td>FRem</td><td>15</td><td>6</td><td>1.9</td></tr> <tr><td>FRem</td><td>15</td><td>6</td><td>1.9</td></tr>
<tr><td colspan="4"><b>Logical Operators</b></td></tr> <tr><td colspan="4"><b>Logical Operators</b></td></tr>
<tr><td>And</td><td>16</td><td>1</td><td>1.0</td></tr> <tr><td>Shl</td><td>16</td><td>1</td><td>1.0</td></tr>
<tr><td>Or</td><td>17</td><td>1</td><td>1.0</td></tr> <tr><td>LShr</td><td>17</td><td>6</td><td>1.9</td></tr>
<tr><td>Xor</td><td>18</td><td>1</td><td>1.0</td></tr> <tr><td>AShr</td><td>18</td><td>6</td><td>1.9</td></tr>
<tr><td>And</td><td>19</td><td>1</td><td>1.0</td></tr>
<tr><td>Or</td><td>20</td><td>1</td><td>1.0</td></tr>
<tr><td>Xor</td><td>21</td><td>1</td><td>1.0</td></tr>
<tr><td colspan="4"><b>Memory Operators</b></td></tr> <tr><td colspan="4"><b>Memory Operators</b></td></tr>
<tr><td>Malloc</td><td>19</td><td>1</td><td>1.0</td></tr> <tr><td>Malloc</td><td>22</td><td>1</td><td>1.0</td></tr>
<tr><td>Free</td><td>20</td><td>1</td><td>1.0</td></tr> <tr><td>Free</td><td>23</td><td>1</td><td>1.0</td></tr>
<tr><td>Alloca</td><td>21</td><td>1</td><td>1.0</td></tr> <tr><td>Alloca</td><td>24</td><td>1</td><td>1.0</td></tr>
<tr><td>Load</td><td>22</td><td>1</td><td>1.0</td></tr> <tr><td>Load</td><td>25</td><td>1</td><td>1.0</td></tr>
<tr><td>Store</td><td>23</td><td>1</td><td>1.0</td></tr> <tr><td>Store</td><td>26</td><td>1</td><td>1.0</td></tr>
<tr><td>GetElementPtr</td><td>24</td><td>1</td><td>1.0</td></tr> <tr><td>GetElementPtr</td><td>27</td><td>1</td><td>1.0</td></tr>
<tr><td colspan="4"><b>Cast Operators</b></td></tr> <tr><td colspan="4"><b>Cast Operators</b></td></tr>
<tr><td>Trunc</td><td>25</td><td>7</td><td>2.0</td></tr> <tr><td>Trunc</td><td>28</td><td>7</td><td>2.0</td></tr>
<tr><td>ZExt</td><td>26</td><td>7</td><td>2.0</td></tr> <tr><td>ZExt</td><td>29</td><td>7</td><td>2.0</td></tr>
<tr><td>SExt</td><td>27</td><td>7</td><td>2.0</td></tr> <tr><td>SExt</td><td>30</td><td>7</td><td>2.0</td></tr>
<tr><td>FPToUI</td><td>28</td><td>7</td><td>2.0</td></tr> <tr><td>FPToUI</td><td>31</td><td>7</td><td>2.0</td></tr>
<tr><td>FPToSI</td><td>29</td><td>7</td><td>2.0</td></tr> <tr><td>FPToSI</td><td>32</td><td>7</td><td>2.0</td></tr>
<tr><td>UIToFP</td><td>30</td><td>7</td><td>2.0</td></tr> <tr><td>UIToFP</td><td>33</td><td>7</td><td>2.0</td></tr>
<tr><td>SIToFP</td><td>31</td><td>7</td><td>2.0</td></tr> <tr><td>SIToFP</td><td>34</td><td>7</td><td>2.0</td></tr>
<tr><td>FPTrunc</td><td>32</td><td>7</td><td>2.0</td></tr> <tr><td>FPTrunc</td><td>35</td><td>7</td><td>2.0</td></tr>
<tr><td>FPExt</td><td>33</td><td>7</td><td>2.0</td></tr> <tr><td>FPExt</td><td>36</td><td>7</td><td>2.0</td></tr>
<tr><td>PtrToInt</td><td>34</td><td>7</td><td>2.0</td></tr> <tr><td>PtrToInt</td><td>37</td><td>7</td><td>2.0</td></tr>
<tr><td>IntToPtr</td><td>35</td><td>7</td><td>2.0</td></tr> <tr><td>IntToPtr</td><td>38</td><td>7</td><td>2.0</td></tr>
<tr><td>BitCast</td><td>36</td><td>7</td><td>2.0</td></tr> <tr><td>BitCast</td><td>39</td><td>7</td><td>2.0</td></tr>
<tr><td colspan="4"><b>Other Operators</b></td></tr> <tr><td colspan="4"><b>Other Operators</b></td></tr>
<tr><td>ICmp</td><td>37</td><td>7</td><td>2.0</td></tr> <tr><td>ICmp</td><td>40</td><td>7</td><td>2.0</td></tr>
<tr><td>FCmp</td><td>38</td><td>7</td><td>2.0</td></tr> <tr><td>FCmp</td><td>41</td><td>7</td><td>2.0</td></tr>
<tr><td>PHI</td><td>39</td><td>1</td><td>1.0</td></tr> <tr><td>PHI</td><td>42</td><td>1</td><td>1.0</td></tr>
<tr><td>Call</td><td>40</td><td>1</td><td>1.0</td></tr> <tr><td>Call</td><td>43</td><td>1</td><td>1.0</td></tr>
<tr><td>Shl</td><td>41</td><td>1</td><td>1.0</td></tr>
<tr><td>LShr</td><td>42</td><td>6</td><td>1.9</td></tr>
<tr><td>AShr</td><td>43</td><td>6</td><td>1.9</td></tr>
<tr><td>Select</td><td>44</td><td>2</td><td>1.2</td></tr> <tr><td>Select</td><td>44</td><td>2</td><td>1.2</td></tr>
<tr><td>UserOp1</td><td>45</td><td>1</td><td>1.0</td></tr> <tr><td>UserOp1</td><td>45</td><td>1</td><td>1.0</td></tr>
<tr><td>UserOp2</td><td>46</td><td>1</td><td>1.0</td></tr> <tr><td>UserOp2</td><td>46</td><td>1</td><td>1.0</td></tr>
@@ -1620,17 +1622,17 @@ encodes the value number of the operand, not the type.</p>
those cases:</p> those cases:</p>
<ul> <ul>
<li>getelementptr: the slot numbers for sequential type indexes are shifted up <li>getelementptr: the slot numbers for sequential type indexes are shifted
two bits. This allows the low order bits will encode the type of index used, up two bits. This allows the low order bits will encode the type of index
as follows: 0=uint, 1=int, 2=ulong, 3=long.</li> used, as follows: 0=uint, 1=int, 2=ulong, 3=long.</li>
<li>cast: the result type number is encoded as the second operand.</li> <li>cast: the result type number is encoded as the second operand.</li>
<li>alloca/malloc: If the allocation has an explicit alignment, the log2 of the <li>alloca/malloc: If the allocation has an explicit alignment, the log2 of
alignment is encoded as the second operand.</li> the alignment is encoded as the second operand.</li>
<li>call: If the tail marker and calling convention cannot be <a <li>call: If the tail marker and calling convention cannot be
href="#pi_note">encoded into the opcode</a> of the call, it is passed as an <a href="#pi_note">encoded into the opcode</a> of the call, it is passed as
additional operand. The low bit of the operand is a flag indicating whether an additional operand. The low bit of the operand is a flag indicating
the call is a tail call. The rest of the bits contain the calling whether the call is a tail call. The rest of the bits contain the calling
convention number (shifted left by one bit).</li> convention number (shifted left by one bit).</li>
</ul> </ul>
</div> </div>
@@ -1657,10 +1659,10 @@ successive fields.</p>
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a></td> <td><a href="#uint32_vbr">uint32_vbr</a></td>
<td class="td_left">Specifies the opcode of the instruction. Note <td class="td_left">Specifies the opcode of the instruction. Note that
that for compatibility with the other instruction formats, the opcode for compatibility with the other instruction formats, the opcode is
is shifted left by 2 bits. Bits 0 and 1 must have value zero for this shifted left by 2 bits. Bits 0 and 1 must have value zero for this
format.</td> format.</td>
</tr> </tr>
<tr> <tr>
<td><a href="#uint24_vbr">uint24_vbr</a></td> <td><a href="#uint24_vbr">uint24_vbr</a></td>
@@ -1832,13 +1834,15 @@ table below. </p>
<td class="td_left">Symbol Table Identifier (0x04)</td> <td class="td_left">Symbol Table Identifier (0x04)</td>
</tr> </tr>
<tr> <tr>
<td><a href="#llist">llist</a>(<a href="#symtab_entry">type_entry</a>)</td> <td><a href="#llist">llist</a>(<a href="#symtab_entry">type_entry</a>)
</td>
<td class="td_left">A length list of symbol table entries for <td class="td_left">A length list of symbol table entries for
<tt>Type</tt>s <tt>Type</tt>s
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a href="#zlist">llist</a>(<a href="#symtab_plane">symtab_plane</a>)</td> <td><a href="#zlist">llist</a>(<a href="#symtab_plane">symtab_plane</a>)
</td>
<td class="td_left">A length list of "type planes" of symbol table <td class="td_left">A length list of "type planes" of symbol table
entries for <tt>Value</tt>s</td> entries for <tt>Value</tt>s</td>
</tr> </tr>
@@ -1896,7 +1900,8 @@ values of a common type. The encoding is given in the following table:</p>
</tr> </tr>
<tr> <tr>
<td><a href="#uint32_vbr">uint32_vbr</a></td> <td><a href="#uint32_vbr">uint32_vbr</a></td>
<td class="td_left">Type slot number of type for all values in this plane..</td> <td class="td_left">Type slot number of type for all values in this plane.
</td>
</tr> </tr>
<tr> <tr>
<td><a href="#value_entry">value_entry</a>+</td> <td><a href="#value_entry">value_entry</a>+</td>
@@ -1973,8 +1978,8 @@ describes the differences between that version and the one that <i>follows</i>.
<div class="doc_subsubsection">Function Flags</div> <div class="doc_subsubsection">Function Flags</div>
<div class="doc_text"> <div class="doc_text">
<p>LLVM bytecode versions prior to 1.4 did not include the 'undef' constant <p>LLVM bytecode versions prior to 1.4 did not include the 'undef' constant
value, which affects the encoding of <a href="#constant">Constant value, which affects the encoding of <a href="#constant">Constant Fields</a>.
Fields</a>.</p> </p>
</div> </div>