Enable assembler functions directive Format .ENABLE argument-list .ENABL argument-list
1 – Parameter
argument-list One or more of the symbolic arguments You can use either the long form or the short form of the symbolic arguments. If you specify multiple arguments, separate them with commas, spaces, or tabs. Table 6 .ENABLE and .DISABLE Symbolic Arguments Short Default Long Form Form Condition Function ALIGN_CODE Disabled The code alignment option aligns certain branch target labels. The ALIGN_CODE option is disabled for the assembly unit if any one of the following is true: o /NOALIGNMENT=CODE is specified on the command line. o .DISABLE ALIGN_CODE is specified in the source program. o The /ALIGNMENT=CODE option is defaulted. ALIGN_DATA Disabled When ALIGN_DATA is disabled, the data- storage directives put each succeeding item on the next byte boundary. When ALIGN_DATA is enabled, the data- storage directives put each succeeding item on natural boundaries (such as words on word boundaries, longwords on longword boundaries) and add pad bytes as necessary. Accessing data on anything other than natural boundaries usually incurs a significant performance penalty. You can enable or disable the ALIGN_DATA option for specific ranges within your program. FLOAT Enabled Controls whether the assembler generates floating-point instructions when optimizing code and performing code-label alignment. Currently, the only floating-point instruction generated by the assembler during optimization and alignment processing is FNOP, the floating- point no-operation instruction. If you specify .DISABLE FLOAT, the assembler does not generate any floating-point instructions as part of optimization and alignment processing. The initial value of this option is specified by the /ENVIRONMENT=[NO]FLOAT command-line option. The last value of the FLOAT option at the end of assembly determines whether FLOAT is enabled or DISABLED. GLOBAL GBL Enabled When GLOBAL is enabled, the assembler implicitly treats any undefined symbol as an external reference defined in another module. If the GLOBAL option is disabled, the assembler issues a warning and implicitly treats the undefined symbol as an external reference assumed to be defined in another module. The last value of the GLOBAL option at the end of assembly determines whether the GLOBAL option is enabled or disabled. LOCAL_BLOCK LSB Disabled Used to override the default assembler behavior to define a temporary label block. (A temporary label is of the form n$ where n represents a number.) A temporary label block is usually delimited by two user-defined local or global labels. However, the .ENABLE LOCAL_BLOCK directive defines the start of a block that is terminated by one of the following: o A second .ENABLE LOCAL_BLOCK directive. o A .DISABLE LOCAL_BLOCK directive followed by a user-defined local or global label, or a .PSECT directive. PEEPHOLE Disabled Peephole optimization reduces the strength of certain instructions and eliminates instructions where possible. The PEEPHOLE option is disabled for the assembly unit if any one of the following is true: o /NOOPTIMIZE=PEEPHOLE is specified on the command line. o .DISABLE PEEPHOLE is specified in the source program. o The PEEPHOLE option is defaulted. PREPROCESSOR_ Enabled When PREPROCESSOR_OUTPUT is enabled, OUTPUT the MACRO-64 preprocessor processes your source statements and outputs to the preprocessor-output file. If the PREPROCESSOR_OUTPUT option is disabled, your source statements are processed as before. However, output of these statements to the preprocessor-output file is suppressed. Neither .ENABLE PREPROCESSOR_OUTPUT nor .DISABLE PREPROCESSOR_OUTPUT is passed through to the preprocessor- output file. These two directives have no effect unless you specify /PREPROCESSOR_ONLY on the command line. SCHEDULE Disabled Instruction scheduling optimization reorders instructions to more optimally utilize the instruction pipeline. The SCHEDULE option is disabled for the assembly unit if any one of the following is true: o /NOOPTIMIZE=SCHEDULE is specified on the command line. o .DISABLE SCHEDULE is specified in the source program. o The SCHEDULE option is defaulted.
2 – Description
.ENABLE enables the specified assembly function. .ENABLE and its negative form, .DISABLE, control the following assembler functions: o Creating local label blocks o Specifying that undefined symbol references are external references o Enabling or disabling specific optimizations for the assembly unit You can enable one or more specific optimization options with either the .ENABLE directive or the /OPTIMIZE command-line qualifier, or both. If you explicitly disable one or more specific optimization options with the .DISABLE directive, those optimization options are disabled regardless of the command-line options you specify.
3 – Notes
o The alternate form of .ENABLE is .ENABL.
4 – Examples
Example 1 The following example shows the ALIGN_DATA option: .PSECT A, NOEXE .ENABLE ALIGN_DATA ; Align on natural ; natural boundaries A: .BYTE 1 ; B: .QUAD 1000 ; B is allocated at ; a natural boundary - ; specifically at A + 7 .DISABLE ALIGN_DATA ; C: .BYTE 2 ; D: .QUAD 1001 ; D is allocated at ; an unaligned boundary - ; specifically C + 1 Example 2 The following example shows the GLOBAL option disabled: .DISABLE GLOBAL .ADDRESS X ; Assembler issues a warning .END Example 3 The following example shows the LOCAL_BLOCK option enabled: .ENABLE LOCAL_BLOCK .PSECT A,NOEXE A1:: 5$: .PROCEDURE_DESCRIPTOR PROC_1 ; Temporary label 5$ .blkb 32 A2:: .address 5$ ; By default the declaration ; of A2 would have ended the ; temporary label block and ; made this reference to 5$ ; illegal. However, this default ; behavior has been overridden ; by the use of .ENABLE LOCAL_BLOCK. .DISABLE LOCAL_BLOCK .END Example 4 The following example shows an unoptimized and optimized list of instructions with the SCHEDULE and PEEPHOLE options enabled: .ENABLE PEEPHOLE,SCHEDULE .psect A,EXE,QUAD ; unoptimized TRAPB A::ADDF F1,F2,F3 ADDF F4,F5,F6 ADDL R1,R2,R3 ADDL R4,R5,R6 This example shows the optimized list of instructions: .ENABLE PEEPHOLE,SCHEDULE .psect A,EXE,QUAD ; optimized A::ADDF F1,F2,F3 ADDL R1,R2,R3 ADDF F4,F5,F6 ADDL R4,R5,R6 The following example shows a repeat block that initializes a block of 1000 longwords to the values of 0 through 999. The .DISABLE PREPROCESSOR_OUTPUT directive suppresses from the preprocessor output file those statements that are incompatible with the OSF/1 Assembler. .DISABLE PREPROCESSOR_OUTPUT I=0 .REPEAT 1000 .ENABLE PREPROCESSOR_OUTPUT .LONG %INTEGER(I) .DISABLE PREPROCESSOR_OUTPUT I = I + 1 .ENDR