diff --git a/docs/LangRef.html b/docs/LangRef.html index adf6e7f085f..b6f6f47256c 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -26,6 +26,7 @@
  • Functions
  • Parameter Attributes
  • Module-Level Inline Assembly
  • +
  • Data Layout
  • Type System @@ -771,6 +772,82 @@ desired. The syntax is very simple:

    + +
    + Data Layout +
    + +
    +

    A module may specify a target specific data layout string that specifies how +data is to be laid out in memory. The syntax for the data layout is simply:
    +

        target datalayout = "layout specification"
    +
    +The layout specification consists of a list of specifications separated +by the minus sign character ('-'). Each specification starts with a letter +and may include other information after the letter to define some aspect of the +data layout. The specifications accepted are as follows:

    +
    +
    E
    +
    Specifies that the target lays out data in big-endian form. That is, the + bits with the most significance have the lowest address location.
    +
    e
    +
    Specifies that hte target lays out data in little-endian form. That is, + the bits with the least significance have the lowest address location.
    +
    p:size:abi:pref
    +
    This specifies the size of a pointer and its abi and + preferred alignments. All sizes are in bits. Specifying the pref + alignment is optional. If omitted, the preceding : should be omitted + too.
    +
    isize:abi:pref
    +
    This specifies the alignment for an integer type of a given bit + size. The value of size must be in the range [1,2^23).
    +
    vsize:abi:pref
    +
    This specifies the alignment for a vector type of a given bit + size.
    +
    fsize:abi:pref
    +
    This specifies the alignment for a floating point type of a given bit + size. The value of size must be either 32 (float) or 64 + (double).
    +
    asize:abi:pref
    +
    This specifies the alignment for an aggregate type of a given bit + size.
    +
    +

    When constructing the data layout for a given target, LLVM starts with a +default set of specifications which are then (possibly) overriden by the +specifications in the datalayout keyword. The default specifications +are given in this list:

    + +

    When llvm is determining the alignment for a given type, it uses the +following rules: +

      +
    1. If the type sought is an exact match for one of the specifications, that + specification is used.
    2. +
    3. If no match is found, and the type sought is an integer type, then the + smallest integer type that is larger than the bitwidth of the sought type is + used. If none of the specifications are larger than the bitwidth then the the + largest integer type is used. For example, given the default specifications + above, the i7 type will use the alignment of i8 (next largest) while both + i65 and i256 will use the alignment of i64 (largest specified).
    4. +
    5. If no match is found, and the type sought is a vector type, then the + largest vector type that is smaller than the sought vector type will be used + as a fall back. This happens because <128 x double> can be implemented in + terms of 64 <2 x double>, for example.
    6. +
    +
    Type System
    @@ -1527,8 +1604,8 @@ and an unconditional branch.

    Arguments:

    The conditional branch form of the 'br' instruction takes a single 'i1' value and two 'label' values. The -unconditional form of the 'br' instruction takes a single 'label' -value as a target.

    +unconditional form of the 'br' instruction takes a single +'label' value as a target.

    Semantics:

    Upon execution of a conditional 'br' instruction, the 'i1' argument is evaluated. If the value is true, control flows