Jeff's fix was fine
[oota-llvm.git] / docs / BytecodeFormat.html
index 5a9b2873a07d0d1e476a6efae9fd91d897b5064b..f479ca57b5f6ca56a09dedec25e0c2834143275d 100644 (file)
@@ -248,8 +248,8 @@ variable bit rate encoding as described above.</p>
     </tr>
     <tr>
       <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 
-        bytes using variable bit rate encoding.</td>
+      <td class="td_left">A 64-bit unsigned integer that occupies from one to 
+        ten bytes using variable bit rate encoding.</td>
     </tr>
     <tr>
       <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>
       <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 
-        of <code>n</code> and <code>m</code> specify the inclusive range of bits 
-        that define the subfield. The value for <code>m</code> may be omitted if 
-        its the same as <code>n</code>.</td>
+      <td class="td_left">A set of bit within some larger integer field. The 
+        values of <code>n</code> and <code>m</code> specify the inclusive range
+        of bits that define the subfield. The value for <code>m</code> may be 
+        omitted if its the same as <code>n</code>.</td>
     </tr>
     <tr>
-      <td style="vertical-align: top;"><b><a name="float"><b>float</b></a></b></td>
-      <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 style="vertical-align: top;"><b><a name="float"><b>float</b></a></b>
+      </td>
+      <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>
     </tr>
     <tr>
-      <td style="vertical-align: top;"><b><b><a name="double"><b>double</b></a></b></b></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>
+      <td style="vertical-align: top;"><b><b><a name="double"><b>double</b></a>
+      </b></b></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>
       <td><a name="string"><b>string</b></a></td>
-      <td class="td_left">A uint32_vbr indicating the type of the
-constant string which also includes its length, immediately followed by
-the characters of the string. There is no terminating null byte in the
-string.</td>
+      <td class="td_left">A uint32_vbr indicating the type of the constant 
+        string which also includes its length, immediately followed by the 
+        characters of the string. There is no terminating null byte in the 
+        string.</td>
     </tr>
     <tr>
       <td><a name="data"><b>data</b></a></td>
-      <td class="td_left">An arbitrarily long segment of data to which
-no interpretation is implied. This is used for constant initializers.<br>
+      <td class="td_left">An arbitrarily long segment of data to which no 
+        interpretation is implied. This is used for constant initializers.<br>
       </td>
     </tr>
     <tr>
       <td><a name="llist"><b>llist(x)</b></a></td>
-      <td class="td_left">A length list of x. This means the list is
-encoded as an <a href="#uint32_vbr">uint32_vbr</a> providing the
-length of the list, followed by a sequence of that many "x" items. This
-implies that the reader should iterate the number of times provided by
-the length.</td>
+      <td class="td_left">A length list of x. This means the list is encoded 
+        as an <a href="#uint32_vbr">uint32_vbr</a> providing the length of the 
+        list, followed by a sequence of that many "x" items. This implies that 
+        the reader should iterate the number of times provided by the length.
+      </td>
     </tr>
     <tr>
       <td><a name="zlist"><b>zlist(x)</b></a></td>
-      <td class="td_left">A zero-terminated list of x. This means the
-list is encoded as a sequence of an indeterminate number of "x" items,
-followed by an <a href="#uint32_vbr">uint32_vbr</a> terminating value.
-This implies that none of the "x" items can have a zero value (or else
-the list terminates).</td>
+      <td class="td_left">A zero-terminated list of x. This means the list is 
+        encoded as a sequence of an indeterminate number of "x" items, followed
+        by an <a href="#uint32_vbr">uint32_vbr</a> terminating value.  This 
+        implies that none of the "x" items can have a zero value (or else the 
+        list terminates).</td>
     </tr>
     <tr>
       <td><a name="block"><b>block</b></a></td>
-      <td class="td_left">A block of data that is logically related. A
-block is an unsigned 32-bit integer that encodes the type of the block
-in 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
-end of the block. Blocks may compose other blocks. </td>
+      <td class="td_left">A block of data that is logically related. A block 
+        is an unsigned 32-bit integer that encodes the type of the block in 
+        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 
+        end of the block. Blocks may compose other blocks. </td>
     </tr>
   </tbody>
 </table>
@@ -333,18 +335,18 @@ following table: </p>
     </tr>
     <tr>
       <td><b><code>?</code></b></td>
-      <td class="td_left">The question mark indicates 0 or 1
-occurrences of the thing preceding it.</td>
+      <td class="td_left">The question mark indicates 0 or 1 occurrences of 
+        the thing preceding it.</td>
     </tr>
     <tr>
       <td><b><code>*</code></b></td>
-      <td class="td_left">The asterisk indicates 0 or more occurrences
-of the thing preceding it.</td>
+      <td class="td_left">The asterisk indicates 0 or more occurrences of the 
+        thing preceding it.</td>
     </tr>
     <tr>
       <td><b><code>+</code></b></td>
-      <td class="td_left">The plus sign indicates 1 or more occurrences
-of the thing preceding it.</td>
+      <td class="td_left">The plus sign indicates 1 or more occurrences of the 
+        thing preceding it.</td>
     </tr>
     <tr>
       <td><b><code>()</code></b></td>
@@ -369,8 +371,8 @@ of the thing preceding it.</td>
 <ol>
   <li>An optional string. Matches either nothing or a single string</li>
   <li>One or more pairs of uint32_vbr.</li>
-  <li>Zero or more occurrences of either an unsigned followed by a
-uint32_vbr or just a uint32_vbr.</li>
+  <li>Zero or more occurrences of either an unsigned followed by a uint32_vbr 
+  or just a uint32_vbr.</li>
   <li>An optional length list of unsigned values.</li>
 </ol>
 </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
 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
-the file.  Slots are used for this purpose. For example, if one has the following
-assembly:
+the file.  Slots are used for this purpose. For example, if one has the 
+following assembly:
 </p>
 <div class="doc_code"><code> %MyType = type { int, sbyte }<br>
 %MyVar = external global %MyType
 </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>
 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
@@ -501,8 +504,8 @@ type constant pool, and symbol table for the function.</td>
       <td>2</td>
       <td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
  href="#constantpool">Function&nbsp;Constant&nbsp;Pool</a></td>
-      <td class="td_left">Any constants (including types) used solely
-within the function are emitted here in the function constant pool. </td>
+      <td class="td_left">Any constants (including types) used solely within 
+        the function are emitted here in the function constant pool. </td>
     </tr>
     <tr>
       <td>0x07</td>
@@ -512,9 +515,9 @@ within the function are emitted here in the function constant pool. </td>
       <td>2</td>
       <td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
  href="#instructionlist">Instruction&nbsp;List</a></td>
-      <td class="td_left">This block contains all the instructions of
-the function. The basic blocks are inferred by terminating
-instructions. </td>
+      <td class="td_left">This block contains all the instructions of the 
+        function. The basic blocks are inferred by terminating instructions.
+      </td>
     </tr>
     <tr>
       <td>0x04</td>
@@ -524,8 +527,8 @@ instructions. </td>
       <td>2</td>
       <td class="td_left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
  href="#symtab">Function&nbsp;Symbol&nbsp;Table</a></td>
-      <td class="td_left">This symbol table provides the names for the
-function specific values used (basic block labels mostly).</td>
+      <td class="td_left">This symbol table provides the names for the function
+        specific values used (basic block labels mostly).</td>
     </tr>
     <tr>
       <td>0x04</td>
@@ -534,9 +537,9 @@ function specific values used (basic block labels mostly).</td>
       <td>No</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">This symbol table provides the names for the
-various entries in the file that are not function specific (global
-vars, and functions mostly).</td>
+      <td class="td_left">This symbol table provides the names for the various 
+        entries in the file that are not function specific (global vars, and 
+        functions mostly).</td>
     </tr>
   </tbody>
 </table>
@@ -669,11 +672,11 @@ sections.</p>
   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,
   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
-  contained in the module, it isn't sufficient for the module block itself
-  because we want to ensure that bytecode files as large as 2<sup>32</sup> bytes
-  are possible. For this reason, the module block (and only the module block)
-  uses a long format header.</p>
+  for size. While the 2<sup>27</sup> byte limit on block size is sufficient 
+  for the blocks contained in the module, it isn't sufficient for the module 
+  block itself because we want to ensure that bytecode files as large as 
+  2<sup>32</sup> bytes are possible. For this reason, the module block (and 
+  only the module block) uses a long format header.</p>
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -744,17 +747,16 @@ types. They are encoded simply as their TypeID.</p>
     </tr>
     <tr>
       <td><a href="#uint24_vbr">uint24_vbr</a></td>
-      <td class="td_left">Type ID for the primitive types (values 1 to
-11) <sup>1</sup></td>
+      <td class="td_left">Type ID for the primitive types (values 1 to 11) 
+        <sup>1</sup></td>
     </tr>
   </tbody>
 </table>
 Notes:
 <ol>
-  <li>The values for the Type IDs for the primitive types are provided
-by the definition of the <code>llvm::Type::TypeID</code> enumeration
-in <code>include/llvm/Type.h</code>. The enumeration gives the
-following mapping:
+  <li>The values for the Type IDs for the primitive types are provided by the 
+  definition of the <code>llvm::Type::TypeID</code> enumeration in 
+  <code>include/llvm/Type.h</code>. The enumeration gives the following mapping:
     <ol>
       <li>bool</li>
       <li>ubyte</li>
@@ -791,8 +793,8 @@ following mapping:
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a>?</td>
-      <td class="td_left">Value 0 if this is a varargs function,
-missing otherwise.</td>
+      <td class="td_left">Value 0 if this is a varargs function, missing 
+        otherwise.</td>
     </tr>
   </tbody>
 </table>
@@ -864,7 +866,7 @@ missing otherwise.</td>
     </tr>
   </tbody>
 </table>
-<h3>Packed Types</h3>
+<h3>Vector Types</h3>
 <table>
   <tbody>
     <tr>
@@ -873,15 +875,15 @@ missing otherwise.</td>
     </tr>
     <tr>
       <td><a href="#uint24_vbr">uint24_vbr</a></td>
-      <td class="td_left">Type ID for Packed Types (18)</td>
+      <td class="td_left">Type ID for Vector Types (18)</td>
     </tr>
     <tr>
       <td><a href="#uint24_vbr">uint24_vbr</a></td>
-      <td class="td_left">Slot number of packed vector's element type.</td>
+      <td class="td_left">Slot number of the vector's element type.</td>
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a></td>
-      <td class="td_left">The number of elements in the packed vector.</td>
+      <td class="td_left">The number of elements in the vector.</td>
     </tr>
   </tbody>
 </table>
@@ -922,41 +924,46 @@ all functions. The format is shown in the table below:</p>
     </tr>
     <tr>
       <td><a href="#zlist">zlist</a>(<a href="#globalvar">globalvar</a>)</td>
-      <td class="td_left">A zero terminated list of global var
-definitions occurring in the module.</td>
+      <td class="td_left">A zero terminated list of global var definitions 
+        occurring in the module.</td>
     </tr>
     <tr>
       <td><a href="#zlist">zlist</a>(<a href="#funcfield">funcfield</a>)</td>
-      <td class="td_left">A zero terminated list of function definitions
-occurring in the module.</td>
+      <td class="td_left">A zero terminated list of function definitions 
+        occurring in the module.</td>
     </tr>
     <tr>
       <td><a href="#llist">llist</a>(<a href="#string">string</a>)</td>
-      <td class="td_left">A length list
-of strings that specify the names of the libraries that this module
-depends upon.</td>
+      <td class="td_left">A length list of strings that specify the names of 
+        the libraries that this module depends upon.</td>
     </tr>
     <tr>
       <td><a href="#string">string</a></td>
-      <td class="td_left">The target
-triple for the module (blank means no target triple specified, i.e. a
-platform-independent module).</td>
+      <td class="td_left">The target triple for the module (blank means no 
+        target triple specified, i.e. a platform-independent module).</td>
     </tr>
     <tr>
-         <td><a href="#string">string</a></td>
-         <td class="td_left">The data layout string describing the endianness, pointer size, and
-type alignments for which the module was written (blank means no data layout specified, i.e. a platform-independent module).</td>
+      <td><a href="#string">string</a></td>
+      <td class="td_left">The data layout string describing the endianness,
+        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>
       <td><a href="#llist">llist</a>(<a href="#string">string</a>)</td>
-      <td class="td_left">A length list
-of strings that defines a table of section strings for globals.  A global's
-SectionID is an index into this table.</td>
+      <td class="td_left">A length list of strings that defines a table of 
+        section strings for globals.  A global's SectionID is an index into 
+        this table.</td>
     </tr>
     <tr>
       <td><a href="#string">string</a></td>
       <td class="td_left">The inline asm block for this module.</td>
     </tr>
+    <tr>
+      <td><a href="#zlist">zlist</a>(<a href="#alias">alias</a>)</td>
+      <td class="td_left">A zero terminated list of aliases occurring in the
+      module.</td>
+    </tr>
   </tbody>
 </table>
 </div>
@@ -986,9 +993,8 @@ and a an optional initializers for the global var.</p>
     </tr>
     <tr>
       <td><a href="#bit">bit(1)</a></td>
-      <td class="td_left">Has initializer? Note that this bit
-determines whether the constant initializer field (described below)
-follows. </td>
+      <td class="td_left">Has initializer? Note that this bit determines 
+        whether the constant initializer field (described below) follows.</td>
     </tr>
     <tr>
       <td><a href="#bit">bit(2-4)</a></td>
@@ -997,7 +1003,11 @@ follows. </td>
         6=DllExport, 7=ExternWeak</td>
     </tr>
     <tr>
-      <td><a href="#bit">bit(5-31)</a></td>
+      <td><a href="#bit">bit(5)</a></td>
+      <td class="td_left">Is Thread Local?</td>
+    </tr>
+    <tr>
+      <td><a href="#bit">bit(6-31)</a></td>
       <td class="td_left">Type slot number of type for the global variable.</td>
     </tr>
   </tbody>
@@ -1056,9 +1066,9 @@ and can includes more information:</p>
       </td>
       <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
-        into the SectionID llist in the <a href="#globalinfo">Module Global
-        Info</a> block.  If this value is 0 or not present, the global has an
-        empty section string.</td>
+        into the SectionID llist in the 
+        <a href="#globalinfo">Module Global Info</a> block.  If this value is 
+        0 or not present, the global has an empty section string.</td>
     </tr>
   </tbody>
 </table>
@@ -1108,17 +1118,17 @@ href="#uint32_vbr">uint32_vbr</a> that describes the function.</p>
     <tr>
       <td><a href="#bit">bit(4)</a></td>
       <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
-      Block</a> in the bytecode file for the function. If the function is
-      external and has <tt>dllimport or extern_weak</tt> linkage additional
-      field in the extension word is used to indicate the actual linkage
-      type.</td>
+        external, and there is no 
+        <a href="#functiondefs">Function Definiton Block</a> in the bytecode 
+        file for the function. If the function is external and has 
+        <tt>dllimport or extern_weak</tt> linkage additional field in the 
+        extension word is used to indicate the actual linkage type.</td>
     </tr>
     <tr>
       <td><a href="#bit">bit(5-30)</a></td>
       <td class="td_left">Type slot number of type for the function.</td>
     </tr>
-                                      <tr>
+    <tr>
       <td><a href="#bit">bit(31)</a></td>
       <td class="td_left">Indicates whether an extension word follows.</td>
     </tr>
@@ -1171,9 +1181,59 @@ follows with the following fields:</p>
       </td>
       <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
-        into the SectionID llist in the <a href="#globalinfo">Module Global
-        Info</a> block.  If this value is 0 or not present, the function has an
-        empty section string.</td>
+        into the SectionID llist in the 
+        <a href="#globalinfo">Module Global Info</a> block.  If this value is 
+        0 or not present, the function has an empty section string.</td>
+    </tr>
+  </tbody>
+</table>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"><a name="alias">Alias Field</a>
+</div>
+<div class="doc_text">
+<p>Aliases are written using 3 <a href="#uint32_vbr">uint32_vbr</a>
+that encode information about alias itself and aliasee.</p>
+
+<p>The table below provides the bit layout of
+the first <a href="#uint32_vbr">uint32_vbr</a> which describes alias itself.</p>
+
+<table>
+  <tbody>
+    <tr>
+      <th><b>Type</b></th>
+      <th class="td_left"><b>Description</b></th>
+    </tr>
+    <tr>
+      <td><a href="#bit">bit(0-1)</a></td>
+      <td class="td_left">Alias linkage. 0 - External linkage, 1 - Internal
+      linkage, 2 - Weak linkage.</td>
+    </tr>
+    <tr>
+      <td><a href="#bit">bit(2)</a></td>
+      <td class="td_left">0 - Aliasee is global value. 1 - Aliasee is constant
+      expression (bitcast of global value)</td>
+    </tr>    
+    <tr>
+      <td><a href="#bit">bit(3-31)</a></td>
+      <td class="td_left">Type slot number of type for the alias itself.</td>
+    </tr>
+  </tbody>
+</table>
+
+  <p>The next <a href="#uint32_vbr">uint32_vbr</a> describes the aliasee. </p>
+
+<table>
+  <tbody>
+    <tr>
+      <th><b>Type</b></th>
+      <th class="td_left"><b>Description</b></th>
+    </tr>
+    <tr>
+      <td><a href="#uint32_vbr">uint32_vbr</a></td>
+      <td class="td_left">Slot number of the aliasee.</td>
     </tr>
   </tbody>
 </table>
@@ -1218,15 +1278,15 @@ both function and module constant pools.</p>
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a></td>
-      <td class="td_left">Zero. This identifies the following "plane"
-as containing the constant strings. This is needed to identify it
-uniquely from other constant planes that follow. </td>
+      <td class="td_left">Zero. This identifies the following "plane" as 
+        containing the constant strings. This is needed to identify it uniquely
+        from other constant planes that follow. </td>
     </tr>
     <tr>
       <td><a href="#uint24_vbr">uint24_vbr</a>+</td>
-      <td class="td_left">Type slot number of the constant string's type.
-Note that the constant string's type implicitly defines the length of
-the string. </td>
+      <td class="td_left">Type slot number of the constant string's type.  Note
+        that the constant string's type implicitly defines the length of the 
+        string. </td>
     </tr>
   </tbody>
 </table>
@@ -1272,21 +1332,28 @@ constant is solely determined by its type. In this case, we have the following
 field definitions, based on type:</p>
 
 <ul>
-  <li><b>Bool</b>. This is written as an <a href="#uint32_vbr">uint32_vbr</a>
-of value 1U or 0U.</li>
-  <li><b>Signed Integers (sbyte,short,int,long)</b>. These are written
-as an <a href="#int64_vbr">int64_vbr</a> with the corresponding value.</li>
-  <li><b>Unsigned Integers (ubyte,ushort,uint,ulong)</b>. These are
-written as an <a href="#uint64_vbr">uint64_vbr</a> with the
-corresponding value. </li>
-  <li><b>Floating Point</b>. Both the float and double types are
-written literally in binary format.</li>
-  <li><b>Arrays</b>. Arrays are written simply as a list of <a
- href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the constant
-element values.</li>
-  <li><b>Structures</b>. Structures are written simply as a list of <a
- href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the constant
-field values of the structure.</li>
+  <li><b>Bool</b>. This is written as an <a href="#uint32_vbr">uint32_vbr</a> of
+  value 1U or 0U.</li>
+  <li><b>Signed Integers (sbyte,short,int,long) &le; 64 bits</b>. These are 
+  written as an <a href="#int64_vbr">int64_vbr</a> with the corresponding 
+  value.</li>
+  <li><b>Unsigned Integers (ubyte,ushort,uint,ulong) &le; 64 bits</b>. These 
+  are written as an <a href="#uint64_vbr">uint64_vbr</a> with the corresponding
+  value. </li>
+  <li><b>Integers &gt; 64 bits</b>. These are written as a length followed by a
+  series of 64-bit words. The length specifies the number of words that follow.
+  Any zero-valued high order words are elided. Words with the least significant
+  bits are written to the lowest file offsets (little endian). The length is 
+  written as an <a href="#uint32_vbr">uint32_vbr</a>. Each word of the value
+  is written as an <a href="#uint64_vbr">uint64_vbr</a>.</li>
+  <li><b>Floating Point</b>. Both the float and double types are written 
+  literally in binary format.</li>
+  <li><b>Arrays</b>. Arrays are written simply as a list of 
+  <a href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the 
+  constant element values.</li>
+  <li><b>Structures</b>. Structures are written simply as a list of 
+  <a href="#uint32_vbr">uint32_vbr</a> encoded value slot numbers to the 
+  constant field values of the structure.</li>
 </ul>
 
 </div>
@@ -1350,18 +1417,18 @@ number of operands+1.</p>
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a></td>
-      <td class="td_left">Op code of the instruction for the constant
-expression.</td>
+      <td class="td_left">Op code of the instruction for the constant 
+        expression.</td>
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a></td>
-      <td class="td_left">The value slot number of the constant value for an
-operand.<sup>1</sup></td>
+      <td class="td_left">The value slot number of the constant value for an 
+        operand.<sup>1</sup></td>
     </tr>
     <tr>
       <td><a href="#uint24_vbr">uint24_vbr</a></td>
-      <td class="td_left">The type slot number for the type of the constant
-value for an operand.<sup>1</sup></td>
+      <td class="td_left">The type slot number for the type of the constant 
+        value for an operand.<sup>1</sup></td>
     </tr>
   </tbody>
 </table>
@@ -1391,24 +1458,25 @@ size<br>
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a></td>
-      <td class="td_left"><a href="#funclinkage_and_visibility">The linkage and
-      visibility</a> style field</td>
+      <td class="td_left">
+        <a href="#funclinkage_and_visibility">The linkage and visibility</a> 
+        style field</td>
     </tr>
     <tr>
       <td><a href="#block">block</a></td>
-      <td class="td_left">The <a href="#constantpool">constant pool</a>
-block for this function.<sup>2</sup></td>
+      <td class="td_left">The <a href="#constantpool">constant pool</a> block 
+        for this function.<sup>2</sup></td>
     </tr>
     <tr>
       <td><a href="#block">block</a></td>
-      <td class="td_left">The <a href="#instructionlist">instruction
-list</a> for the function.</td>
+      <td class="td_left">The <a href="#instructionlist">instruction list</a> 
+        for the function.</td>
     </tr>
     <tr>
       <td><a href="#block">block</a></td>
-      <td class="td_left">The function's <a href="#symtab">symbol
-table</a> containing only those symbols pertinent to the function
-(mostly block labels).</td>
+      <td class="td_left">The function's <a href="#symtab">symbol table</a> 
+        containing only those symbols pertinent to the function (mostly block 
+        labels).</td>
     </tr>
   </tbody>
 </table>
@@ -1433,7 +1501,8 @@ other fields will be present as the function is defined elsewhere.</li>
     <tr>
       <td><a href="#bit">bit(0-15)</a></td>
       <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>
       <td><a href="#bit">bit(16-18)</a></td>
@@ -1467,8 +1536,8 @@ the block is given in the following table.</p>
     </tr>
     <tr>
       <td><a href="#instruction">instruction</a>+</td>
-      <td class="td_left">An instruction. Instructions have a variety
-of formats. See <a href="#instruction">Instructions</a> for details.</td>
+      <td class="td_left">An instruction. Instructions have a variety of 
+        formats. See <a href="#instruction">Instructions</a> for details.</td>
     </tr>
   </tbody>
 </table>
@@ -1519,44 +1588,44 @@ possible. </p>
       <tr><td>Add</td><td>7</td><td>1</td><td>1.0</td></tr>
       <tr><td>Sub</td><td>8</td><td>1</td><td>1.0</td></tr>
       <tr><td>Mul</td><td>9</td><td>1</td><td>1.0</td></tr>
-      <tr><td>UDiv</td><td>10</td><td>1</td><td>1.9</td></tr>
-      <tr><td>SDiv</td><td>11</td><td>1</td><td>1.9</td></tr>
-      <tr><td>FDiv</td><td>12</td><td>1</td><td>1.9</td></tr>
-      <tr><td>URem</td><td>13</td><td>1</td><td>1.9</td></tr>
-      <tr><td>SRem</td><td>14</td><td>1</td><td>1.9</td></tr>
-      <tr><td>FRem</td><td>15</td><td>1</td><td>1.9</td></tr>
+      <tr><td>UDiv</td><td>10</td><td>6</td><td>1.9</td></tr>
+      <tr><td>SDiv</td><td>11</td><td>6</td><td>1.9</td></tr>
+      <tr><td>FDiv</td><td>12</td><td>6</td><td>1.9</td></tr>
+      <tr><td>URem</td><td>13</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 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>Or</td><td>17</td><td>1</td><td>1.0</td></tr>
-      <tr><td>Xor</td><td>18</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>LShr</td><td>17</td><td>6</td><td>1.9</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>Malloc</td><td>19</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>Alloca</td><td>21</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>Store</td><td>23</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>Malloc</td><td>22</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>24</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>26</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>Trunc</td><td>25</td><td>1</td><td>2.0</td></tr>
-      <tr><td>ZExt</td><td>26</td><td>1</td><td>2.0</td></tr>
-      <tr><td>SExt</td><td>27</td><td>1</td><td>2.0</td></tr>
-      <tr><td>FPToUI</td><td>28</td><td>1</td><td>2.0</td></tr>
-      <tr><td>FPToSI</td><td>29</td><td>1</td><td>2.0</td></tr>
-      <tr><td>UIToFP</td><td>30</td><td>1</td><td>2.0</td></tr>
-      <tr><td>SIToFP</td><td>31</td><td>1</td><td>2.0</td></tr>
-      <tr><td>FPTrunc</td><td>32</td><td>1</td><td>2.0</td></tr>
-      <tr><td>FPExt</td><td>33</td><td>1</td><td>2.0</td></tr>
-      <tr><td>PtrToInt</td><td>34</td><td>1</td><td>2.0</td></tr>
-      <tr><td>IntToPtr</td><td>35</td><td>1</td><td>2.0</td></tr>
-      <tr><td>BitCast</td><td>36</td><td>1</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>29</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>31</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>33</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>35</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>37</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>39</td><td>7</td><td>2.0</td></tr>
       <tr><td colspan="4"><b>Other Operators</b></td></tr>
-      <tr><td>ICmp</td><td>37</td><td>1</td><td>1.0</td></tr>
-      <tr><td>FCmp</td><td>38</td><td>1</td><td>1.0</td></tr>
-      <tr><td>PHI</td><td>39</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>Shl</td><td>41</td><td>1</td><td>1.0</td></tr>
-      <tr><td>LShr</td><td>42</td><td>6</td><td>2.0</td></tr>
-      <tr><td>AShr</td><td>43</td><td>6</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>41</td><td>7</td><td>2.0</td></tr>
+      <tr><td>PHI</td><td>42</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>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>UserOp2</td><td>46</td><td>1</td><td>1.0</td></tr>
@@ -1573,15 +1642,15 @@ possible. </p>
       <tr><td>Call+FastCC+TailCall</td><td>59</td><td>5</td><td>1.5</td></tr>
       <tr><td>Call+FastCC</td><td>60</td><td>5</td><td>1.5</td></tr>
       <tr><td>Call+CCC+TailCall</td><td>61</td><td>5</td><td>1.5</td></tr>
-      <tr><td>Load+Volatile</td><td>62</td><td>3</td><td>1.3</td></tr>
-      <tr><td>Store+Volatile</td><td>63</td><td>3</td><td>1.3</td></tr>
+      <tr><td>Load+Attributes</td><td>62</td><td>7</td><td>2.0</td></tr>
+      <tr><td>Store+Attributes</td><td>63</td><td>7</td><td>2.0</td></tr>
     </tbody>
   </table>
 
 <p><b><a name="pi_note">* Note: </a></b>
 These aren't really opcodes from an LLVM language perspective. They encode
 information into other opcodes without reserving space for that information. 
-For example, opcode=63 is a Volatile Store. The opcode for this
+For example, opcode=63 is an Attributed Store. The opcode for this
 instruction is 25 (Store) but we encode it as 63 to indicate that is a Volatile
 Store. The same is done for the calling conventions and tail calls.
 In each of these entries in range 56-63, the opcode is documented as the base
@@ -1620,17 +1689,17 @@ encodes the value number of the operand, not the type.</p>
 those cases:</p>
 
 <ul>
-<li>getelementptr: the slot numbers for sequential type indexes are shifted up
-two bits.  This allows the low order bits will encode the type of index 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>alloca/malloc: If the allocation has an explicit alignment, the log2 of the
-    alignment is encoded as the second operand.</li>
-<li>call: If the tail marker and calling convention cannot be <a 
-    href="#pi_note">encoded into the opcode</a> of the call, it is passed as an
-    additional operand.  The low bit of the operand is a flag indicating whether
-    the call is a tail call.  The rest of the bits contain the calling 
-    convention number (shifted left by one bit).</li>
+  <li>getelementptr: the slot numbers for sequential type indexes are shifted 
+  up two bits.  This allows the low order bits will encode the type of index 
+  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>alloca/malloc: If the allocation has an explicit alignment, the log2 of 
+  the alignment is encoded as the second operand.</li>
+  <li>call: If the tail marker and calling convention cannot be 
+  <a href="#pi_note">encoded into the opcode</a> of the call, it is passed as 
+  an additional operand.  The low bit of the operand is a flag indicating 
+  whether the call is a tail call.  The rest of the bits contain the calling 
+  convention number (shifted left by one bit).</li>
 </ul>
 </div>
 
@@ -1657,10 +1726,10 @@ successive fields.</p>
     </tr>
     <tr>
       <td><a href="#uint32_vbr">uint32_vbr</a></td>
-      <td class="td_left">Specifies the opcode of the instruction. Note
-that for compatibility with the other instruction formats, the opcode
-is shifted left by 2 bits. Bits 0 and 1 must have value zero for this
-format.</td>
+      <td class="td_left">Specifies the opcode of the instruction. Note that 
+        for compatibility with the other instruction formats, the opcode is 
+        shifted left by 2 bits. Bits 0 and 1 must have value zero for this 
+        format.</td>
     </tr>
     <tr>
       <td><a href="#uint24_vbr">uint24_vbr</a></td>
@@ -1832,13 +1901,15 @@ table below. </p>
       <td class="td_left">Symbol Table Identifier (0x04)</td>
     </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
         <tt>Type</tt>s
       </td>
     </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
         entries for <tt>Value</tt>s</td>
     </tr>
@@ -1896,7 +1967,8 @@ values of a common type. The encoding is given in the following table:</p>
     </tr>
     <tr>
       <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>
       <td><a href="#value_entry">value_entry</a>+</td>
@@ -1973,8 +2045,8 @@ describes the differences between that version and the one that <i>follows</i>.
 <div class="doc_subsubsection">Function Flags</div>
 <div class="doc_text">
   <p>LLVM bytecode versions prior to 1.4 did not include the 'undef' constant
-     value, which affects the encoding of <a href="#constant">Constant
-     Fields</a>.</p>
+  value, which affects the encoding of <a href="#constant">Constant Fields</a>.
+  </p>
 </div>