fix more table abuses.
[oota-llvm.git] / docs / LangRef.html
index fd40c92f9aab93c4f05032f4e2db8968ebc189ff..86f1ee3b51bba0657d23657816d7f6d72e52d846 100644 (file)
@@ -40,6 +40,7 @@
       </li>
       <li><a href="#t_derived">Derived Types</a>
         <ol>
+          <li><a href="#t_integer">Integer Type</a></li>
           <li><a href="#t_array">Array Type</a></li>
           <li><a href="#t_function">Function Type</a></li>
           <li><a href="#t_pointer">Pointer Type</a></li>
@@ -671,7 +672,8 @@ accessed through pointers.</p>
 <p>A global variable may be declared to reside in a target-specifc numbered 
 address space. For targets that support them, address spaces may affect how
 optimizations are performed and/or what target instructions are used to access 
-the variable. The default address space is zero.</p>
+the variable. The default address space is zero. The address space qualifier 
+must precede any other attributes.</p>
 
 <p>LLVM allows an explicit section to be specified for globals.  If the target
 supports it, it will emit globals to the section specified.</p>
@@ -1068,28 +1070,18 @@ value.</p>
 
 <h5>Examples:</h5>
 <table class="layout">
-  <tr class="layout">
-    <td class="left">
-      <tt>i1</tt><br/>
-      <tt>i4</tt><br/>
-      <tt>i8</tt><br/>
-      <tt>i16</tt><br/>
-      <tt>i32</tt><br/>
-      <tt>i42</tt><br/>
-      <tt>i64</tt><br/>
-      <tt>i1942652</tt><br/>
-    </td>
-    <td class="left">
-      A boolean integer of 1 bit<br/>
-      A nibble sized integer of 4 bits.<br/>
-      A byte sized integer of 8 bits.<br/>
-      A half word sized integer of 16 bits.<br/>
-      A word sized integer of 32 bits.<br/>
-      An integer whose bit width is the answer. <br/>
-      A double word sized integer of 64 bits.<br/>
-      A really big integer of over 1 million bits.<br/>
-    </td>
+  <tbody>
+  <tr>
+    <td><tt>i1</tt></td>
+    <td>a single-bit integer.</td>
+  </tr><tr>
+    <td><tt>i32</tt></td>
+    <td>a 32-bit integer.</td>
+  </tr><tr>
+    <td><tt>i1942652</tt></td>
+    <td>a really big integer of over 1 million bits.</td>
   </tr>
+  </tbody>
 </table>
 </div>
 
@@ -1116,31 +1108,31 @@ be any type with a size.</p>
 <h5>Examples:</h5>
 <table class="layout">
   <tr class="layout">
-    <td class="left">
-      <tt>[40 x i32 ]</tt><br/>
-      <tt>[41 x i32 ]</tt><br/>
-      <tt>[40 x i8]</tt><br/>
-    </td>
-    <td class="left">
-      Array of 40 32-bit integer values.<br/>
-      Array of 41 32-bit integer values.<br/>
-      Array of 40 8-bit integer values.<br/>
-    </td>
+    <td class="left"><tt>[40 x i32]</tt></td>
+    <td class="left">Array of 40 32-bit integer values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>[41 x i32]</tt></td>
+    <td class="left">Array of 41 32-bit integer values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>[4 x i8]</tt></td>
+    <td class="left">Array of 4 8-bit integer values.</td>
   </tr>
 </table>
 <p>Here are some examples of multidimensional arrays:</p>
 <table class="layout">
   <tr class="layout">
-    <td class="left">
-      <tt>[3 x [4 x i32]]</tt><br/>
-      <tt>[12 x [10 x float]]</tt><br/>
-      <tt>[2 x [3 x [4 x i16]]]</tt><br/>
-    </td>
-    <td class="left">
-      3x4 array of 32-bit integer values.<br/>
-      12x10 array of single precision floating point values.<br/>
-      2x3x4 array of 16-bit integer  values.<br/>
-    </td>
+    <td class="left"><tt>[3 x [4 x i32]]</tt></td>
+    <td class="left">3x4 array of 32-bit integer values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>[12 x [10 x float]]</tt></td>
+    <td class="left">12x10 array of single precision floating point values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>[2 x [3 x [4 x i16]]]</tt></td>
+    <td class="left">2x3x4 array of 16-bit integer  values.</td>
   </tr>
 </table>
 
@@ -1247,7 +1239,7 @@ instruction.</p>
     <td class="left"><tt>&lt; { i32, i32, i32 } &gt;</tt></td>
     <td class="left">A triple of three <tt>i32</tt> values</td>
   </tr><tr class="layout">
-  <td class="left"><tt>&lt;&nbsp;{&nbsp;float,&nbsp;i32&nbsp;(i32)&nbsp;*&nbsp;}&nbsp;&gt;</tt></td>
+  <td class="left"><tt>&lt; { float, i32 (i32)* } &gt;</tt></td>
     <td class="left">A pair, where the first element is a <tt>float</tt> and the
       second element is a <a href="#t_pointer">pointer</a> to a
       <a href="#t_function">function</a> that takes an <tt>i32</tt>, returning
@@ -1270,20 +1262,20 @@ zero.</p>
 <h5>Examples:</h5>
 <table class="layout">
   <tr class="layout">
-    <td class="left">
-      <tt>[4x i32]*</tt><br/>
-      <tt>i32 (i32 *) *</tt><br/>
-                       <tt>i32 addrspace(5)*</tt><br/>
-    </td>
-    <td class="left">
-      A <a href="#t_pointer">pointer</a> to <a href="#t_array">array</a> of
-      four <tt>i32</tt> values<br/>
-      A <a href="#t_pointer">pointer</a> to a <a
+    <td class="left"><tt>[4x i32]*</tt></td>
+    <td class="left">A <a href="#t_pointer">pointer</a> to <a
+                    href="#t_array">array</a> of four <tt>i32</tt> values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>i32 (i32 *) *</tt></td>
+    <td class="left"> A <a href="#t_pointer">pointer</a> to a <a
       href="#t_function">function</a> that takes an <tt>i32*</tt>, returning an
-      <tt>i32</tt>.<br/>
-                       A <a href="#t_pointer">pointer</a> to an <tt>i32</tt> value that resides 
-                       in address space 5.<br/>
-    </td>
+      <tt>i32</tt>.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>i32 addrspace(5)*</tt></td>
+    <td class="left">A <a href="#t_pointer">pointer</a> to an <tt>i32</tt> value
+     that resides in address space #5.</td>
   </tr>
 </table>
 </div>
@@ -1315,16 +1307,16 @@ be any integer or floating point type.</p>
 
 <table class="layout">
   <tr class="layout">
-    <td class="left">
-      <tt>&lt;4 x i32&gt;</tt><br/>
-      <tt>&lt;8 x float&gt;</tt><br/>
-      <tt>&lt;2 x i64&gt;</tt><br/>
-    </td>
-    <td class="left">
-      Vector of 4 32-bit integer values.<br/>
-      Vector of 8 floating-point values.<br/>
-      Vector of 2 64-bit integer values.<br/>
-    </td>
+    <td class="left"><tt>&lt;4 x i32&gt;</tt></td>
+    <td class="left">Vector of 4 32-bit integer values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>&lt;8 x float&gt;</tt></td>
+    <td class="left">Vector of 8 32-bit floating-point values.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>&lt;2 x i64&gt;</tt></td>
+    <td class="left">Vector of 2 64-bit integer values.</td>
   </tr>
 </table>
 </div>
@@ -1350,12 +1342,8 @@ structure type).</p>
 
 <table class="layout">
   <tr class="layout">
-    <td class="left">
-      <tt>opaque</tt>
-    </td>
-    <td class="left">
-      An opaque type.<br/>
-    </td>
+    <td class="left"><tt>opaque</tt></td>
+    <td class="left">An opaque type.</td>
   </tr>
 </table>
 </div>
@@ -2670,7 +2658,8 @@ allocate, and free memory in LLVM.</p>
 <h5>Overview:</h5>
 
 <p>The '<tt>malloc</tt>' instruction allocates memory from the system
-heap and returns a pointer to it.</p>
+heap and returns a pointer to it. The object is always allocated in the generic 
+address space (address space zero).</p>
 
 <h5>Arguments:</h5>
 
@@ -2757,7 +2746,8 @@ after this instruction executes.</p>
 
 <p>The '<tt>alloca</tt>' instruction allocates memory on the stack frame of the
 currently executing function, to be automatically released when this function
-returns to its caller.</p>
+returns to its caller. The object is always allocated in the generic address 
+space (address space zero).</p>
 
 <h5>Arguments:</h5>
 
@@ -3971,6 +3961,10 @@ Front-ends for type-safe garbage collected languages should generate these
 intrinsics to make use of the LLVM garbage collectors.  For more details, see <a
 href="GarbageCollection.html">Accurate Garbage Collection with LLVM</a>.
 </p>
+
+<p>The garbage collection intrinsics only operate on objects in the generic 
+       address space (address space zero).</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->