Vax performance V-008 SP User's Guide Page 16

  • Download
  • Add to my manuals
  • Print
  • Page
    / 176
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 15
Preparing to Port Macro-32 Code
1.1 Features of the MACRO Compiler
compiler to further examine the code and discover other problems the initial one
concealed.
The compiler includes many features that make this process easier, such as:
Qualifiers that allow you to control the kinds of messages the compiler
generates or to enforce VAX behavior in the generated code. For example, the
/FLAG qualifier enables you to specify the types of informational messages
the compiler reports. Many of these messages identify porting problems,
including VAX architectural dependencies. The options to the /FLAG qualifier
include reporting unaligned stack and memory references and reporting
unsupported directives. (For more information about the /FLAG qualifier, see
Appendix A, MACRO Compiler Qualifiers.)
Directives that indicate routine entry points and describe them to the
compiler or enforce VAX behavior for sections of code. For example,
.CALL_ENTRY declares the entry point of a called routine to the compiler.
Section 2.3, Section 2.5, and Chapter 3 discuss situations when the compiler
requires special directives. (See Appendix B, Specialized Directives.)
For OpenVMS Alpha platforms, built-ins that allow you to access the Alpha
instructions that perform 64-bit operations and Alpha PALcode instructions.
(PALcode is shorthand for privileged architecture library code.) For example,
EVAX_ADDQ, with the appropriate operands, performs the quadword add
instruction. (See Appendix C, MACRO Compiler Built-ins.)
For OpenVMS I64 platforms, built-ins that allow you to access certain I64
instructions. In addition, to aid in porting code from Alpha to I64, many
of the EVAX_builtins have been reimplemented for I64. (See Appendix C,
MACRO Compiler Built-ins.)
The compiler also provides 64-bit addressing support, which is documented in
Chapter 5 and in Appendix E. Support for 64-bit addressing was introduced in
OpenVMS Alpha Version 7.0. This support is provided for those rare instances
when it is preferable to use VAX MACRO to access 64-bit address space instead
of using a high-level language that is supported on OpenVMS Alpha or OpenVMS
I64.
1.2 Differences Between the Compiler and the Assembler
It is important to remember that the MACRO compiler is a compiler, not an
assembler. It does not create output code that exactly matches the input code.
In its optimization process, the compiler might move, replicate, or remove code
and interleave instructions. Furthermore, the faulting behavior of the ported
code might not match that of VAX code. These differences are described in the
following sections.
1.2.1 Moving Code
Mispredicted branches are expensive on an OpenVMS Alpha or OpenVMS I64
system. The compiler attempts to determine the most likely code path through
the module and then generates code that consolidates that code path. Code paths
deemed unlikely are moved out of line to the end of the module. Consider the
following example:
1–2 Preparing to Port Macro-32 Code
Page view 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 175 176

Comments to this Manuals

No comments