From a1dad814dff441a4a82d4524e7a9313b09d1df5a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 16 Oct 2004 18:03:55 +0000 Subject: [PATCH] Add missing 'Instruction Opcodes' bullet to TOC Update for changes in LLVM 1.4 bytecode format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17032 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/BytecodeFormat.html | 138 ++++++++++++++++++++++++++++----------- 1 file changed, 100 insertions(+), 38 deletions(-) diff --git a/docs/BytecodeFormat.html b/docs/BytecodeFormat.html index 026f1dc7992..23b88f5c9f9 100644 --- a/docs/BytecodeFormat.html +++ b/docs/BytecodeFormat.html @@ -40,12 +40,13 @@
  • Function Definition
  • Compaction Table
  • Instruction List
  • +
  • Instruction Opcodes
  • Symbol Table
  • Version Differences
      - +
    1. Version 1.3 Differences From 1.4
    2. Version 1.2 Differences From 1.3
    3. Version 1.1 Differences From 1.2
    4. Version 1.0 Differences From 1.1
    5. @@ -934,8 +935,8 @@ all functions. The format is shown in the table below:

      definitions occurring in the module. - zlist(uint24_vbr) - A zero terminated list of function types + zlist(funcfield) + A zero terminated list of function definitions occurring in the module. @@ -958,6 +959,7 @@ platform independent module).
      + @@ -1011,6 +1013,36 @@ numbers of the global variable's constant initializer. + + + +
      +

      Functions are written using an uint32_vbr +that encodes information about the function and a set of flags.

      + +

      The table below provides the bit layout of the uint32_vbr that describes the function.

      + + + + + + + + + + + + + + + + +
      TypeDescription
      bit(0-4)Reserved for future use. Currently set to 00001.
      bit(5-)Type slot number of type for the function.
      + +
      +
      @@ -1114,8 +1146,13 @@ element values. href="#uint32_vbr">uint32_vbr encoded value slot numbers to the constant field values of the structure. -

      When the number of operands to the constant is non-zero, we have a -constant expression and its field format is provided in the table below.

      + +

      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.

      @@ -1466,7 +1503,7 @@ single uint32_vbr as follows:

      - +

      Instructions encode an opcode that identifies the kind of instruction. Opcodes are an enumerated integer value. The specific values used depend on @@ -1491,41 +1528,42 @@ single uint32_vbr as follows:

      + - - - - - + + + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + +
      Switch311.0
      Invoke411.0
      Unwind511.0
      Unreachable611.4
      Binary Operators
      Add611.0
      Sub711.0
      Mul811.0
      Div911.0
      Rem1011.0
      Add711.0
      Sub811.0
      Mul911.0
      Div1011.0
      Rem1111.0
      Logical Operators
      And1111.0
      Or1211.0
      Xor1311.0
      And1211.0
      Or1311.0
      Xor1411.0
      Binary Comparison Operators
      SetEQ1411.0
      SetNE1511.0
      SetLE1611.0
      SetGE1711.0
      SetLT1811.0
      SetGT1911.0
      SetEQ1511.0
      SetNE1611.0
      SetLE1711.0
      SetGE1811.0
      SetLT1911.0
      SetGT2011.0
      Memory Operators
      Malloc2011.0
      Free2111.0
      Alloca2211.0
      Load2311.0
      Store2411.0
      GetElementPtr2511.0
      Malloc2111.0
      Free2211.0
      Alloca2311.0
      Load2411.0
      Store2511.0
      GetElementPtr2611.0
      Other Operators
      PHI2611.0
      Cast2711.0
      Call2811.0
      Shl2911.0
      Shr3011.0
      VANext3111.0
      VAArg3211.0
      Select3321.2
      UserOp13411.0
      UserOp23511.0
      PHI2711.0
      Cast2811.0
      Call2911.0
      Shl3011.0
      Shr3111.0
      VANext3211.0
      VAArg3311.0
      Select3421.2
      UserOp13511.0
      UserOp23611.0
      @@ -1672,11 +1710,33 @@ section here describes the differences between that version and the one that follows.

      + - + 1.4 + +
      Unreachable Instruction
      +
      +

      The LLVM Unreachable instruction + was added in version 1.4 of LLVM. This caused all instruction numbers after + it to shift down by one.

      +
      + +
      Function Flags
      +
      +

      LLVM bytecode versions prior to 1.4 did not include the 5 bit offset + in the function list in the Module Global Info block.

      +
      + +
      Function Flags
      +
      +

      LLVM bytecode versions prior to 1.4 did not include the 'undef' constant + value, which affects the encoding of Constant + Fields.

      +
      + + +
      Type Derives From Value

      In version 1.2, the Type class in the LLVM IR derives from the Value -- 2.34.1