[llvm-commits] CVS: llvm/docs/LangRef.html

Chris Lattner lattner at cs.uiuc.edu
Thu Aug 12 12:12:40 PDT 2004



Changes in directory llvm/docs:

LangRef.html updated: 1.71 -> 1.72
---
Log message:

Add description of packed type support.

Patch contributed by Brad Jones!


---
Diffs of the changes:  (+40 -22)

Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.71 llvm/docs/LangRef.html:1.72
--- llvm/docs/LangRef.html:1.71	Fri Jul  2 16:08:14 2004
+++ llvm/docs/LangRef.html	Thu Aug 12 14:12:28 2004
@@ -26,7 +26,7 @@
           <li><a href="#t_function">Function Type</a></li>
           <li><a href="#t_pointer">Pointer Type</a></li>
           <li><a href="#t_struct">Structure Type</a></li>
-<!-- <li><a href="#t_packed" >Packed Type</a> -->
+          <li><a href="#t_packed">Packed Type</a></li>
         </ol>
       </li>
     </ol>
@@ -398,7 +398,7 @@
     <tr>
       <td><a name="t_firstclass">first class</a></td>
       <td><tt>bool, ubyte, sbyte, ushort, short,<br>
-uint, int, ulong, long, float, double, <a href="#t_pointer">pointer</a></tt></td>
+uint, int, ulong, long, float, double, <a href="#t_pointer">pointer</a>, <a href="#t_packed">packed</a></tt></td>
     </tr>
   </tbody>
 </table>
@@ -555,22 +555,29 @@
     </tr>
   </tbody>
 </table>
-
-</div>
-<!-- _______________________________________________________________________ --><!--
-<div class="doc_subsubsection">
-  <a name="t_packed">Packed Type</a>
 </div>
-
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="t_packed">Packed Type</a> </div>
 <div class="doc_text">
-
-Mention/decide that packed types work with saturation or not. Maybe have a packed+saturated type in addition to just a packed type.<p>
-
-Packed types should be 'nonsaturated' because standard data types are not saturated.  Maybe have a saturated packed type?<p>
-
+<h5>Overview:</h5>
+<p>A packed type is a simple derived type that represents a vector
+of elements.  Packed types are used when multiple primitive data 
+are operated in parallel using a single instruction (SIMD). 
+A packed type requires a size (number of
+elements) and an underlying primitive data type.  Packed types are
+considered <a href="#t_firstclass">first class</a>.</p>
+<h5>Syntax:</h5>
+<pre>  < <# elements> x <elementtype> ><br></pre>
+<p>The number of elements is a constant integer value, elementtype may
+be any integral or floating point type.</p>
+<h5>Examples:</h5>
+<p> <tt><4 x int></tt>: Packed vector of 4 integer values.<br>
+<tt><8 x float></tt>: Packed vector of 8 floating-point values.<br>
+<tt><2 x uint></tt>: Packed vector of 2 unsigned integer values.</p>
+<p> </p>
 </div>
 
---><!-- *********************************************************************** -->
+<!-- *********************************************************************** -->
 <div class="doc_section"> <a name="highlevel">High Level Structure</a> </div>
 <!-- *********************************************************************** --><!-- ======================================================================= -->
 <div class="doc_subsection"> <a name="modulestructure">Module Structure</a> </div>
@@ -930,7 +937,9 @@
 <div class="doc_text">
 <p>Binary operators are used to do most of the computation in a
 program.  They require two operands, execute an operation on them, and
-produce a single value. The result value of a binary operator is not
+produce a single value.  Although, that single value might represent 
+multiple data, as is the case with the <a href="#t_packed">packed</a> data type. 
+The result value of a binary operator is not
 necessarily the same type as its operands.</p>
 <p>There are several different binary operators:</p>
 </div>
@@ -945,8 +954,9 @@
 <p>The '<tt>add</tt>' instruction returns the sum of its two operands.</p>
 <h5>Arguments:</h5>
 <p>The two arguments to the '<tt>add</tt>' instruction must be either <a
- href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
-values. Both arguments must have identical types.</p>
+ href="#t_integer">integer</a> or <a href="#t_floating">floating point</a> values.
+ This instruction can also take <a href="#t_packed">packed</a> versions of the values.
+Both arguments must have identical types.</p>
 <h5>Semantics:</h5>
 <p>The value produced is the integer or floating point sum of the two
 operands.</p>
@@ -969,7 +979,9 @@
 <h5>Arguments:</h5>
 <p>The two arguments to the '<tt>sub</tt>' instruction must be either <a
  href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
-values. Both arguments must have identical types.</p>
+values. 
+This instruction can also take <a href="#t_packed">packed</a> versions of the values.
+Both arguments must have identical types.</p>
 <h5>Semantics:</h5>
 <p>The value produced is the integer or floating point difference of
 the two operands.</p>
@@ -991,7 +1003,9 @@
 <h5>Arguments:</h5>
 <p>The two arguments to the '<tt>mul</tt>' instruction must be either <a
  href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
-values. Both arguments must have identical types.</p>
+values. 
+This instruction can also take <a href="#t_packed">packed</a> versions of the values.
+Both arguments must have identical types.</p>
 <h5>Semantics:</h5>
 <p>The value produced is the integer or floating point product of the
 two operands.</p>
@@ -1014,7 +1028,9 @@
 <h5>Arguments:</h5>
 <p>The two arguments to the '<tt>div</tt>' instruction must be either <a
  href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
-values. Both arguments must have identical types.</p>
+values. 
+This instruction can also take <a href="#t_packed">packed</a> versions of the values.
+Both arguments must have identical types.</p>
 <h5>Semantics:</h5>
 <p>The value produced is the integer or floating point quotient of the
 two operands.</p>
@@ -1035,7 +1051,9 @@
 <h5>Arguments:</h5>
 <p>The two arguments to the '<tt>rem</tt>' instruction must be either <a
  href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
-values. Both arguments must have identical types.</p>
+values. 
+This instruction can also take <a href="#t_packed">packed</a> versions of the values.
+Both arguments must have identical types.</p>
 <h5>Semantics:</h5>
 <p>This returns the <i>remainder</i> of a division (where the result
 has the same sign as the divisor), not the <i>modulus</i> (where the
@@ -2593,7 +2611,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2004/07/02 21:08:14 $
+  Last modified: $Date: 2004/08/12 19:12:28 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list