User`s guide

How the MACRO Compiler Functions on Different Platforms
2.12 Compiling and Linking
Example 2–1 (Cont.) Example of Line Numbering in an OpenVMS I64 Listing File
00000000 29 clrl r4
00000000 30 clrl r5
00000000 31 test1
00000000 32 clrl r6
00000000 33 .ENDM test2
00000000 34
00000000 35 foo: .jsb_entry
00000000 56 .show expansions
00000000 57 clrl r0
00000011 58 test2
1.......
%IMAC-E-UPLEVSTK, (1) up-level stack reference in routine FOO
X01/001 00000002 clrl r4
X01/002 00000004 clrl r5
X01/003 00000006 test1
X02/004 00000006 clrl r1
X02/005 00000008 clrl r2
X02/006 0000000A tstl 48(sp) ; generate uplevel stack error
X02/007 0000000D clrl r3
X02/008 0000000F
X01/009 0000000F clrl r6
X01/010 00000011
00000011 59 rsb
00000012 60 .noshow expansions
00000012 61
00000012 62 .END
2.13 Debugging
The compiler provides full debugger support. The debug session for compiled VAX
MACRO code is similar to that for assembled VAX MACRO code. However, there
are some important differences that are described in this section. For a complete
description of debugging, see the HP OpenVMS Debugger Manual.
2.13.1 Code Relocation
One major difference is that the code is compiled rather than assembled. On
an OpenVMS VAX system, each VAX MACRO instruction is a single machine
instruction. On an OpenVMS Alpha or OpenVMS I64 system, each VAX MACRO
instruction may be compiled into many Alpha or Itanium machine instructions.
A major side effect of this difference is the relocation and rescheduling of code if
you do not specify /NOOPTIMIZE in your compile command.
By default, several optimizations are performed that cause the movement of
generated code across source boundaries (see Section 1.2, Section 4.3, and
Appendix A). For most code modules, debugging is simplified if you compile
with /NOOPTIMIZE, which prevents this relocation from happening. After you
have debugged your code, you can recompile without /NOOPTIMIZE to improve
performance.
2–32 How the MACRO Compiler Functions on Different Platforms