The following examples use two instructions and are only concerned
with the general register fields:
The Load (L) instruction in which the first operand is a register
field requiring a resolved absolute value of 0 through to 15. This
value specifies a General Register (GR) which is treated as a
32-bit General Register (GR32).
The Load (LG) instruction in which the first operand is a register
field requiring a resolved absolute value of 0 through to 15. This
value specifies a General Register (GR) which is treated as a
64-bit General Register (GR64).
Assembler type GR can normally be used for both the L and LG
instructions, unless symbols have been defined with types of GR32 or
GR64. Once use is made of the 32-bit or 64-bit types for general
registers, then the assembler becomes more restrictive in its
checking. This could be helpful when you are programming for a mix of hardware
architectures, or converting code from 32-bit to 64-bit hardware.
Each unresolved general register field is an expression
composed of one or more terms. The assembler checks only the
first term as follows for the L instruction:
If the term is not a symbol, no more checking is performed.
If the assembler type of the symbol is GR32, no more checking is performed
If the assembler type of the symbol is GR, and the flag shows that
at least one instance of an EQU statement with GR32 has been encountered,
the assembler issues an informational message (severity 0) about a possible
type checking conflict.
If the assembler type of the symbol is assigned but is not GR or GR32,
the assembler issues a warning message (severity 4) about a type checking
conflict.
If the assembler type of the symbol is
not assigned, and the flags show that at least one instance of an EQU with GR or
GR32 has been encountered,
the assembler issues an informational message (severity 0)
about a possible type checking conflict.
If the assembler type of the symbol is
not assigned,and if the flags show that no instances of an EQU with GR or GR32 have
been encountered, no more checking is performed.
Each unresolved general register field is an expression
composed of one or more terms. The assembler checks only the
first term as follows for the LG instruction:
If the term is not a symbol, no more checking is performed.
If the assembler type of the symbol is GR64, no more checking is performed.
If the assembler type of the symbol is GR, and the flag shows that
at least one instance of an EQU with GR64 has been encountered,
the assembler issues an informational message (severity 0)
about a possible type checking conflict.
If the assembler type of the symbol is assigned, but is not GR or GR64,
the assembler issues a warning message (severity 4) about a type checking
conflict.
If the assembler type of the symbol is
not assigned, and if the flags show that at least one instance of an EQU with GR or
GR64 has been encountered,
the assembler issues an informational message (severity 0) about a possible
type checking conflict.
If the assembler type of the symbol is
not assigned,and if the flags show that no instances of an EQU with GR or GR64 have
been encountered, no more checking is performed.
Figure 1 shows an example of General Register checking,
with a warning message about an incompatible symbol type, and an informational message
about a symbol not assigned an assembler type due to the existence of an EQU statement
with GR in the source code.
Figure 1. General Register type checking with GR activated
00000000 5824 C000 00000000 30 L 2,0(4,12)
00000004 5824 C000 00000000 31 L R2,0(R4,R12)
00000008 5824 C000 00000000 32 L A2,0(R4,R12)
** ASMA323W Symbol A2 has incompatible type with general register field
0000000C 5824 C000 00000000 33 L REG2,0(R4,R12)
** ASMA324I Symbol REG2 may have incompatible type with general register field
00000010 E324 C000 0004 00000000 34 LG R2,0(R4,R12)
35 *
00000002 36 R2 EQU 2,,,,GR
00000004 37 R4 EQU 4,,,,GR
0000000C 38 R12 EQU 12,,,,GR
39 *
00000002 40 A2 EQU 2,,,,AR
41 *
00000002 42 REG2 EQU 2
Figure 2 shows an example of General Register checking,
with a warning message about an incompatible symbol type, and tolerance of symbols
not assigned an assembler type due to the lack of an EQU statement
with GR in the source code.
Figure 2. General Register type checking with GR inactive
00000000 5824 C000 00000000 30 L 2,0(4,12)
00000004 5824 C000 00000000 31 L R2,0(R4,R12)
00000008 5824 C000 00000000 32 L A2,0(R4,R12)
** ASMA323W Symbol A2 has incompatible type with general register field
0000000C 5824 C000 00000000 33 L REG2,0(R4,R12)
00000010 E334 C000 0004 00000000 34 LG R3,0(R4,R12)
35 *
00000002 36 R2 EQU 2
00000003 37 R3 EQU 3
00000004 38 R4 EQU 4
0000000C 39 R12 EQU 12
40 *
00000002 41 A2 EQU 2,,,,AR
42 *
00000002 43 REG2 EQU 2
Figure 3 shows an example of General Register checking,
with an informational message about a symbol with a GR assembler type due to the
existence of an EQU statement with GR32 in the source code, and a warning message about
an incompatible symbol type.
Figure 3. General Register type checking with GR32 activated
00000000 5824 C000 00000000 31 L R2,0(R4,R12)
** ASMA324I Symbol R2 may have incompatible type with general register field
00000004 E334 C000 0004 00000000 32 LG R3,0(R4,R12)
** ASMA323W Symbol R3 has incompatible type with general register field
0000000A E324 C000 0004 00000000 33 LG R2,0(R4,R12)
34 *
00000002 35 R2 EQU 2,,,,GR
00000003 36 R3 EQU 3,,,,GR32
00000004 37 R4 EQU 4,,,,GR
0000000C 38 R12 EQU 12,,,,GR
Figure 4 shows an example of General Register checking,
with informational messages about symbols with a GR assembler type due to the
existence of both an EQU statement with GR32 and an EQU statement with GR64 in the source
code, and a warning message about an incompatible symbol type.
Figure 4. General Register type checking with GR32 and GR64 activated
00000000 5824 C000 00000000 31 L R2,0(R4,R12)
** ASMA324I Symbol R2 may have incompatible type with general register field
00000004 E334 C000 0004 00000000 32 LG R3,0(R4,R12)
** ASMA323W Symbol R3 has incompatible type with general register field
0000000A E324 C000 0004 00000000 33 LG R2,0(R4,R12)
** ASMA324I Symbol R2 may have incompatible type with general register field
34 *
00000002 35 R2 EQU 2,,,,GR
00000003 36 R3 EQU 3,,,,GR32
00000004 37 R4 EQU 4,,,,GR
00000005 38 R5 EQU 5,,,,GR64
0000000C 39 R12 EQU 12,,,,GR