General Register type checking

The following examples use two instructions and are only concerned with the general register fields:

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 may be an expression comprised of one or more terms. The assembler checks only the first term as follows for the L instruction:

Each unresolved general register field may be an expression comprised of one or more terms. The assembler checks only the first term as follows for the LG instruction:

Figure 75 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 75. 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 76 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 76. 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 77 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 77. 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 78 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 78. 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

[ Top of Page | Previous Page | Next Page | Contents | Index ]