From 591d049aa3d9c7e70d945022e1282722ab409f13 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 25 Jan 2006 23:31:53 +0000 Subject: [PATCH] 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 --- docs/BytecodeFormat.html | 70 ++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/docs/BytecodeFormat.html b/docs/BytecodeFormat.html index f67751b25e6..be231781680 100644 --- a/docs/BytecodeFormat.html +++ b/docs/BytecodeFormat.html @@ -1275,16 +1275,21 @@ for the details.

+ -
Constant Field
+
Simple Constant Pool +Entries
+
-

Constants come in many shapes and flavors. The sections that follow -define the format for each of them. All constants start with a 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 uint32_vbr 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:

+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:

+ +
+ + +
Undef Entries
+ +

When the number of operands to the constant is one, we have an 'undef' value of the specified type.

+
-

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.

+ +
Inline Assembler Entries
+ +
+

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:

+ + + + + + + + + + + + + + + + + + + + +
TypeField Description
stringThe asm string.
stringThe constraints string.
uint32_vbrFlags
+ +

Currently, the only defined flag, the low bit, indicates whether or not the + inline assembler has side effects.

+ +
+ + +
Constant Expression Entries
+ +
+ +

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.