Jeff's fix was fine
[oota-llvm.git] / docs / BytecodeFormat.html
index b2370eecc4b0c65c4c71f5c94eb047a7b55bd199..f479ca57b5f6ca56a09dedec25e0c2834143275d 100644 (file)
@@ -943,11 +943,11 @@ all functions. The format is shown in the table below:</p>
         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>
@@ -959,6 +959,11 @@ all functions. The format is shown in the table below:</p>
       <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>
@@ -998,7 +1003,11 @@ and a an optional initializers for the global var.</p>
         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>
@@ -1119,7 +1128,7 @@ href="#uint32_vbr">uint32_vbr</a> that describes the function.</p>
       <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>
@@ -1181,6 +1190,56 @@ follows with the following fields:</p>
 
 </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>
+
+</div>
+
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsection"><a name="constantpool">Constant Pool</a> </div>
 <div class="doc_text">
@@ -1275,10 +1334,18 @@ 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>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 
@@ -1575,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