diff --git a/docs/LangRef.html b/docs/LangRef.html index 86041a4d49f..926d8dca346 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -72,13 +72,14 @@
  • Other Operations
      +
    1. 'phi' Instruction
    2. 'cast .. to' Instruction
    3. 'call' Instruction -
    4. 'icall' Instruction -
    5. 'phi' Instruction
    + @@ -752,13 +753,15 @@ provided as part of the constant values type.

    to label <normal label> except label <exception label> -

    Overview:
    The 'invoke' instruction is used to cause control -flow to transfer to a specified function, with the possibility of control flow -transfer to either the 'normal label' label or the 'exception -label'. The 'call' instruction is closely -related, but guarantees that control flow either never returns from the called -function, or that it returns to the instruction succeeding the 'call' instruction.

    +

    Overview:
    + +The 'invoke' instruction is used to cause control flow to transfer to a +specified function, with the possibility of control flow transfer to either the +'normal label' label or the 'exception label'. The 'call' instruction is closely related, but guarantees +that control flow either never returns from the called function, or that it +returns to the instruction succeeding the 'call' +instruction.

    Arguments:
    @@ -774,7 +777,8 @@ an arbitrary pointer to function value.

    function to be invoked.

  • 'function args': argument list whose types match the function -signature argument types. +signature argument types. If the function signature indicates the function +accepts a variable number of arguments, the extra arguments can be specified.
  • 'normal label': the label reached when the called function executes a 'ret' instruction. @@ -826,7 +830,7 @@ There is only one unary operator: the 'not' instru The 'not' instruction returns the bitwise complement of its operand.

    Arguments:
    -The single argument to 'not' must be of of integral type.

    +The single argument to 'not' must be of of integral or bool type.

    Semantics:
    The 'not' instruction returns the bitwise @@ -980,7 +984,13 @@ The 'rem' instruction returns the remainder from the division of its t The two arguments to the 'rem' instruction must be either integral or floating point values. Both arguments must have identical types.

    Semantics:
    -TODO: remainder or modulus?

    + +This returns the remainder of a division (where the result has the same +sign as the divisor), not the modulus (where the result has the same sign +as the dividend) of a value. For more information about the difference, see: The Math +Forum.

    + ...

    Example:
    @@ -1002,24 +1012,37 @@ TODO: remainder or modulus?

    <result> = setge <ty> <var1>, <var2> ; yields {bool}:result -

    Overview:
    -The 'setcc' family of instructions returns a boolean value based on a comparison of their two operands.

    +

    Overview:
    The 'setcc' family of instructions returns a +boolean value based on a comparison of their two operands.

    Arguments:
    The two arguments to the 'setcc' instructions must be of first class or pointer type (it is not possible to compare 'label's, 'array's, 'structure' or 'void' -values). Both arguments must have identical types.

    +values, etc...). Both arguments must have identical types.

    -The 'setlt', 'setgt', 'setle', and 'setge' instructions do not operate on 'bool' typed arguments.

    +The 'setlt', 'setgt', 'setle', and 'setge' +instructions do not operate on 'bool' typed arguments.

    Semantics:
    -The 'seteq' instruction yields a true 'bool' value if both operands are equal.
    -The 'setne' instruction yields a true 'bool' value if both operands are unequal.
    -The 'setlt' instruction yields a true 'bool' value if the first operand is less than the second operand.
    -The 'setgt' instruction yields a true 'bool' value if the first operand is greater than the second operand.
    -The 'setle' instruction yields a true 'bool' value if the first operand is less than or equal to the second operand.
    -The 'setge' instruction yields a true 'bool' value if the first operand is greater than or equal to the second operand.

    + +The 'seteq' instruction yields a true 'bool' value if +both operands are equal.
    + +The 'setne' instruction yields a true 'bool' value if +both operands are unequal.
    + +The 'setlt' instruction yields a true 'bool' value if +the first operand is less than the second operand.
    + +The 'setgt' instruction yields a true 'bool' value if +the first operand is greater than the second operand.
    + +The 'setle' instruction yields a true 'bool' value if +the first operand is less than or equal to the second operand.
    + +The 'setge' instruction yields a true 'bool' value if +the first operand is greater than or equal to the second operand.

    Example:
    @@ -1057,7 +1080,10 @@ bitwise binary operators is always the same type as its first operand.

    The 'and' instruction returns the bitwise logical and of its two operands.

    Arguments:
    -The two arguments to the 'and' instruction must be either integral or bool values. Both arguments must have identical types.

    + +The two arguments to the 'and' instruction must be either integral or bool values. Both arguments must +have identical types.

    Semantics:
    @@ -1087,8 +1113,8 @@ inclusive or of its two operands.

    Arguments:
    The two arguments to the 'or' instruction must be either integral or bool values. -Both arguments must have identical types.

    +href="#t_integral">integral or bool values. Both arguments must +have identical types.

    Semantics:
    @@ -1119,8 +1145,8 @@ two operands.

    Arguments:
    The two arguments to the 'xor' instruction must be either integral or bool values. -Both arguments must have identical types.

    +href="#t_integral">integral or bool values. Both arguments must +have identical types.

    Semantics:
    @@ -1202,7 +1228,7 @@ The first argument to the 'shr' instruction must be an Memory Access Operations


    'cast .. to' Instruction


    'phi' Instruction


    'cast .. to' Instruction


    'icall' Instruction

      - -Indirect calls are desperately needed to implement virtual function tables (C++, java) and function pointers (C, C++, ...).

      - -A new instruction icall or similar should be introduced to represent an indirect call.

      - -Example: -

      -  %retval = icall int %funcptr(int %arg1)          ; yields {int}:%retval
      -
      - - - - -


    'phi' Instruction

      - -
      Syntax:
      -
      -
      - -
      Overview:
      - - -
      Arguments:
      - - -
      Semantics:
      - - -
      Example:
      -
      -
      - - - - +
    Related Work
      - + Codesigned virtual machines.

      @@ -1542,7 +1660,7 @@ Codesigned virtual machines.

      This interview influenced the design and thought process behind LLVM in several ways, most notably the way that derived types are written in text format. See the question that starts with "you defined the C declarator syntax as an experiment that failed".

      - +


    Vectorized Architectures

    @@ -1573,7 +1697,7 @@ more...
    Chris Lattner
    -Last modified: Fri May 3 14:39:52 CDT 2002 +Last modified: Mon May 6 17:07:42 CDT 2002