Packed Structure Definitions (docs)
authorAndrew Lenharth <andrewl@lenharth.org>
Fri, 8 Dec 2006 17:13:00 +0000 (17:13 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Fri, 8 Dec 2006 17:13:00 +0000 (17:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32357 91177308-0d34-0410-b5e6-96231b3b80d8

docs/BytecodeFormat.html
docs/LangRef.html

index 669e7197f5efcc7603597cd3d90e2c7cd71acac9..524879f6097eec5f19504d87a76cedb3676cb386 100644 (file)
@@ -861,6 +861,10 @@ missing otherwise.</td>
       <td><a href="#uint24_vbr">uint24_vbr</a></td>
       <td class="td_left">Type ID for structure types (14)</td>
     </tr>
+    <tr>
+      <td><a href="#uint32_vbr">uint32_vbr</a></td>
+      <td class="td_left">Value 0 if a normal structure, 1 if a packed structure</td>
+    </tr>
     <tr>
       <td><a href="#zlist">zlist</a>(<a href="#uint24_vbr">uint24_vbr</a>)</td>
       <td class="td_left">Slot number of each of the element's fields.</td>
index 64725a700fe6c6600697de7d2f08c2994fd54fbf..35585f252b8a156dc75f1a512515710aea7b1f8f 100644 (file)
@@ -40,6 +40,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_pstruct">Packed Structure Type</a></li>
           <li><a href="#t_packed">Packed Type</a></li>
           <li><a href="#t_opaque">Opaque Type</a></li>
         </ol>
@@ -932,6 +933,38 @@ instruction.</p>
 </table>
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="t_pstruct">Packed Structure Type</a>
+</div>
+<div class="doc_text">
+<h5>Overview:</h5>
+<p>The packed structure type is used to represent a collection of data members
+together in memory.  There is no padding between fields.  Further, the alignment
+of a packed structure is 1 byte.  The elements of a packed structure may
+be any type that has a size.</p>
+<p>Structures are accessed using '<tt><a href="#i_load">load</a></tt>
+and '<tt><a href="#i_store">store</a></tt>' by getting a pointer to a
+field with the '<tt><a href="#i_getelementptr">getelementptr</a></tt>'
+instruction.</p>
+<h5>Syntax:</h5>
+<pre>  &lt; { &lt;type list&gt; } &gt; <br></pre>
+<h5>Examples:</h5>
+<table class="layout">
+  <tr class="layout">
+    <td class="left">
+      <tt> &lt; { int, int, int } &gt; </tt><br/>
+      <tt> &lt; { float, int (int) * } &gt; </tt><br/>
+    </td>
+    <td class="left">
+      a triple of three <tt>int</tt> values<br/>
+      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>int</tt>, returning an <tt>int</tt>.<br/>
+    </td>
+  </tr>
+</table>
+</div>
+
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection"> <a name="t_pointer">Pointer Type</a> </div>
 <div class="doc_text">