diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-25 23:31:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-25 23:31:53 +0000 |
commit | 591d049aa3d9c7e70d945022e1282722ab409f13 (patch) | |
tree | e3b3040fb8e053f03335bd7542120b502ff6d95e /docs/BytecodeFormat.html | |
parent | 3bc5a60b80dc27868a5c6f14358a068a110e6ded (diff) |
update the bytecode format guide for the encoding of inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/BytecodeFormat.html')
-rw-r--r-- | docs/BytecodeFormat.html | 70 |
1 files changed, 61 insertions, 9 deletions
diff --git a/docs/BytecodeFormat.html b/docs/BytecodeFormat.html index f67751b25e..be23178168 100644 --- a/docs/BytecodeFormat.html +++ b/docs/BytecodeFormat.html @@ -1275,16 +1275,21 @@ for the details. </p> </tbody> </table> </div> + <!-- _______________________________________________________________________ --> -<div class="doc_subsubsection"><a name="constant">Constant Field</a></div> +<div class="doc_subsubsection"><a name="constant">Simple Constant Pool +Entries</a></div> + <div class="doc_text"> -<p>Constants come in many shapes and flavors. The sections that follow -define the format for each of them. All constants start with a <a + +<p>Constant pool entries come in many shapes and flavors. The sections that +follow define the format for each of them. All constants start with a <a href="#uint32_vbr">uint32_vbr</a> encoded integer that provides the number of operands for the constant. For primitive, structure, and -array constants, this will always be zero since those types of -constants have no operands. In this case, we have the following field -definitions:</p> +array constants, this will always be zero to indicate that the form of the +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> @@ -1303,12 +1308,59 @@ element values.</li> field values of the structure.</li> </ul> +</div> + +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection">Undef Entries</a></div> + +<div class="doc_text"> <p>When the number of operands to the constant is one, we have an 'undef' value of the specified type.</p> +</div> + +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection">Inline Assembler Entries</a></div> + +<div class="doc_text"> +<p>Inline Assembler entries are stored in the constant pool, though they are not + officially LLVM constants. These entries are marked with a value of + "4294967295" (all ones) for the number of operands. They are encoded as + follows:</p> + +<table> + <tbody> + <tr> + <th><b>Type</b></th> + <th class="td_left"><b>Field Description</b></th> + </tr> + <tr> + <td><a href="#string">string</a></td> + <td class="td_left">The asm string.</td> + </tr> + <tr> + <td><a href="#string">string</a></td> + <td class="td_left">The constraints string.</td> + </tr> + <tr> + <td><a href="#uint32_vbr">uint32_vbr</a></td> + <td class="td_left">Flags</sup></td> + </tr> + </tbody> +</table> + +<p>Currently, the only defined flag, the low bit, indicates whether or not the + inline assembler has side effects.</p> + +</div> + +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection">Constant Expression Entries</a></div> + +<div class="doc_text"> -<p>When the number of operands to the constant is greater than one, we have a -constant expression and its field format is provided in the table below, and the -number is equal to the number of operands+1.</p> +<p>Otherwise, we have a constant expression. The format of the constant +expression is specified in the table below, and the number is equal to the +number of operands+1.</p> <table> <tbody> <tr> |