HELPLIB.HLB  —  MACRO  /ALPHA  Program Sections
    MACRO-64 allows you to divide your program into sections called
    psects using the .PSECT directive. Psects are useful for
    organizing your program, and for low-level control over the
    linking process. More importantly, each psect falls into one
    of the following three categories:

    o  CODE psects can contain only instructions. They contain no
       data. Psects in this category have the EXE and NOMIX psect
       attributes.

    o  DATA psects can contain only data. They contain no
       instructions. Psects in this category have the NOEXE and NOMIX
       attributes.

    o  MIXED psects can contain instructions, data, or both. Psects
       in this category have the MIX attribute. In addition, they may
       have either the EXE or NOEXE attribute.

    MACRO-64 categorizes psects because:

    o  There is a significant performance compromise associated
       with mixing instructions and data in the same program section
       within the Alpha architecture. This is because the Alpha
       architecture typically maintains separate memory caches
       for instructions and data.

    o  If you mix instructions and data, it is likely that
       instructions will migrate into the data cache and that
       data will migrate into the instruction cache. While this
       situation still yields correct results, the benefits of the
       instruction and data caches are diminished. Placing data in
       the instruction stream can also have detrimental effects on
       the instruction pipeline and the multiple instruction-issue
       capabilities that most Alpha systems employ.

    Since a code psect can contain only instructions and cannot
    contain arbitrary data, instructions you place in a CODE psect
    can be analyzed by the assembler optimizer and by the symbolic
    debugger. Since a mixed psect can contain arbitrary data as well
    as instructions, instructions you place in a mixed psect are not
    analyzed by the assembler optimizer or by the symbolic debugger.
    Instead, the assembler internally converts instructions in a
    mixed psect to an equivalent data representation.

    Because of the compromises associated with mixed psects, by
    default the assembler creates psects with the NOMIX psect
    attribute. If you need to place data in a psect that has the
    EXE attribute, or if you need to place instructions in a psect
    that has the NOEXE attribute, you must also specify the MIX
    attribute in the psect's definition. Note that unlike the other
    psect attributes, the MIX psect attribute is an assembly-time
    attribute. The MIX psect attribute does not appear in the psect
    definitions in your object module and it does not affect the
    linking process.

    You can use all assembler directives and instructions within
    mixed psects. While many assembler directives can be used
    within both code and data psects, data-storage directives
    cannot be used in code psects and instructions and instruction-
    storage directives cannot be used in data psects. If you place
    instructions or instruction-storage directives in a data psect,
    or if you place data-storage directives in a code psect, the
    assembler issues a diagnostic message.

    In summary, code psects may contain only storage for instructions
    and storage created by instruction directives. Data psects may
    contain only storage created by data directives. Mixed psects may
    contain either storage for instructions or data or both. There
    are no restrictions on the use of data directives in a mixed
    psect. However, the assembler converts instructions you place in
    a mixed psect to a data representation. Therefore, instructions
    in a mixed psect are not analyzed as instructions by either the
    assembler optimizer or the symbolic debugger.
Close Help