IBM Support

PH38969: NEW CHECKING OPTIONS FLAG(RENT) AND TYPECHECK(SIGNED)

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • New options are required to provide more flexibility in
    reentrancy checks and in checking immediate value ranges.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of HLASM for z/OS, z/VM, z/VSE and     *
    *                 Linux                                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: New checking options FLAG(RENT) and     *
    *                      TYPECHECK(SIGNED)                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    1. It could sometimes be useful to write code which modifies a
       data area which is normally read-only, or even a copy of that
       area, but there is no way to selectively disable the
       reentrant code check which produces message "ASMA036W
       Reentrant check failed" except by turning it off completely
       for the whole assembly, either by using the NORENT option (if
       the reference is within a CSECT) or by suppressing the
       warning using SUPRWARN(36).
    
    2. Range checking for immediate operand values is inconsistent
       and does not allow the convenience of specifying a signed
       value for an unsigned field, and vice versa.  For a signed
       field, it is possible to get round this using the option
       TYPECHECK(NOMAGNITUDE), but that completely disables all
       range checking.
    
    3. Error messages for immediate values do not show the value in
       error, which can be confusing for instructions which support
       multiple immediate or mask operands.
    
    4. The OPTIONS report showed the ILMA option after the INFO
       option, out of correct alphabetical sequence.
    

Problem conclusion

Temporary fix

Comments

  • 1. The new option FLAG(RENT|NORENT) can now be used to enable or
       disable the reentrant code check warning message ASMA036W.
       The default is FLAG(RENT) for compatibility.  ACONTROL
       FLAG(NORENT) may be used to temporarily disable the warning,
       and PUSH and POP ACONTROL may be used as usual to save and
       restore the existing settings around the affected code.
    
    2. The new option TYPECHECK(SIGNED|NOSIGNED) controls whether
       range validation requested via TYPECHECK(MAGNITUDE) for an
       immediate operand value takes into account whether the field
       is signed or not.  The default is TYPECHECK(SIGNED), which
       means that a signed field will only accept the correct range
       of signed values and an unsigned field will only accept the
       correct range of unsigned values.  If TYPECHECK(NOSIGNED) is
       specified, values are accepted from either range, provided
       that they still fit within the size of the field.
    
       The option TYPECHECK(MAGNITUDE|NOMAGNITUDE) now applies to
       both signed and unsigned immediate values occupying one to
       three bytes.  When TYPECHECK(NOMAGNITUDE) is in effect, no
       range or sign check is applied to these values, and the value
       used is simply the required number of low-order bits.  This
       option has sometimes been used to allow an unsigned value to
       be used for a signed immediate field, but the new option
       TYPECHECK(NOSIGNED) can now be used instead to provide
       equivalent function while still validating that the value
       fits within the field.
    
       Immediate and mask fields which are less than one byte or
       have special range constraints are still checked as before,
       giving message ASMA031E if the value is invalid.
    
       Here are some examples of instructions where the immediate
       operand is not in the correct unsigned or signed range
       according to the instruction definition but which are
       accepted without warnings when TYPECHECK(NOSIGNED) is
       specified:
    
         MVI  0(1),-1   is accepted as   MVI  0(1),X'FF'
         TMLL 0,-1      is accepted as   TMLL 0,X'FFFF'
         LHI  0,X'FFFF' is accepted as   LHI  0,-1
    
       Note that sign propagation for signed immediate fields may
       cause confusion when unsigned values outside the signed range
       are used.  In the LHI example, the register will be set to
       the value X'FFFFFFFF', equal to -1, not the specified value
       X'0000FFFF', equal to 65535.  Signed immediate operands
       should normally be entered as the actual value to be used,
       regardless of the form in which the operand appears within
       the generated instruction.
    
    3. Messages ASMA031E and ASMA320W, which are produced when
       immediate values are invalid or out of range, have now been
       modified to show the relevant value.
    
    4. The ILMA option has been moved before the INFO option in
       the OPTIONS report to correct the alphabetical sequence.
    
    Note that this APAR replaces the installation default options
    module ASMADOPT and the macro ASMAOPT used to generate it, so
    any modified local installation defaults (normally defined as
    USERMOD ML00001 based on the sample ASMAOPTS job) must be
    reapplied after installing the PTF.
    
    DOCUMENTATION UPDATES:
    
    The HLASM Programmer's Guide, SC26-4941-08 is updated for the
    new options.
    
    In the section "Assembler options", the FLAG option is updated
    to include the RENT/NORENT options.
    
    In the FLAG syntax diagram, the option RENT/NORENT is added
    after RECORD/NORECORD.  The default is RENT, so that is above
    the line.
    
    In the FLAG defaults, RENT is added after RECORD.  There is no
    abbreviation for this option.
    
    In the FLAG options list, RENT and NORENT are added after
    NORECORD:
    
      RENT
        Instructs the assembler to issue diagnostic warning message
        ASMA036W if reentrant checks as specified by the RENT option
        detect a potential error.
    
      NORENT
        Instructs the assembler not to issue diagnostic warning
        message ASMA036W.
    
    In the section "Assembler options", the TYPECHECK option is
    updated to include the SIGNED/NOSIGNED options.
    
    The default in the syntax diagram and under the "Default"
    heading is changed to:
      TYPECHECK(MAGNITUDE,REGISTER,SIGNED)
    
    The SIGNED/NOSIGNED option is added to the syntax diagram below
    the REGISTER/NOREGISTER option.
    
    The abbreviations list is updated to include the corresponding
    abbreviations SI and NOSI.
    
    The descriptions for MAGNITUDE and NOMAGNITUDE are updated
    as follows:
    
      MAGNITUDE
        Specifies that the assembler performs magnitude validation
        of signed or unsigned immediate-data machine instruction
        operands occupying 1 to 3 bytes, ensuring that the specified
        value fits within the operand field.
    
      NOMAGNITUDE
        Specifies that the assembler does not perform magnitude
        validation of signed or unsigned immediate-data machine
        instruction operands occupying 1 to 3 bytes.  The value
        stored is simply the appropriate number of low-order bits of
        the specified value.
    
    Descriptions for SIGNED and NOSIGNED are added as follows:
    
      SIGNED
        Specifies that the validation for TYPECHECK(MAGNITUDE) takes
        into account whether the field is signed or not, and only
        allows the relevant signed or unsigned range of values.
        This has no effect when TYPECHECK(NOMAGNITUDE) is in effect.
    
      NOSIGNED
        Specifies that the validation for TYPECHECK(MAGNITUDE) does
        not take into account whether the field is signed or not,
        allowing values to be within the valid range of either
        signed or unsigned values for the size of the field.
    
    Similar updates are applied to the HLASM Language Reference,
    SC26-4940-09, where the ACONTROL section on the FLAG option is
    updated to include RENT/NORENT and the section on the TYPECHECK
    option is updated to include SIGNED/NOSIGNED.
    
    In the HLASM Installation and Customization Guide, SC26-3494-05,
    there are new ASMAOPT options to set the default values for
    the new options, and the description of TYPECHECK(MAGNITUDE) is
    changed.
    
      RENTWARN=YES|NO
    
        YES
          Instructs the assembler to perform reentrancy checks as
          specified by the RENT option and issue diagnostic warning
          message ASMA036W for reentrant check failures.
    
        NO
          Instructs the assembler not to issue diagnostic warning
          message ASMA036W.
    
        Default
          RENTWARN=YES
    
        Note: This option can be specified as an assembler
        invocation parameter by specifying the FLAG(RENT|NORENT)
        option.
    
      TYPECHECK=(MAGNITUDE,REGISTER,SIGNED)
    
        MAGNITUDE | NOMAGNITUDE
          Specifies whether the assembler performs magnitude
          validation of signed or unsigned immediate-data machine
          instruction operands occupying 1 to 3 bytes, ensuring that
          the specified value fits within the operand field.
    
        ...
    
        SIGNED | NOSIGNED
          Specifies whether magnitude validation of immediate-data
          operand values should take into account whether the field
          is signed, or should allow both signed and unsigned values
          regardless.
    
    In Appendix F of the Programmer's Guide, the documentation of
    messages ASMA031E and ASMA320W is updated to append a message
    insert "- xxxxxxxx" which identifies the immediate operand value
    that caused the problem.
    
    END OF DOCUMENTATION UPDATES
    

APAR Information

  • APAR number

    PH38969

  • Reported component name

    HLASM MVS, VM &

  • Reported component ID

    569623400

  • Reported release

    160

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    YesSpecatt / New Function / Xsystem

  • Submitted date

    2021-07-14

  • Closed date

    2021-07-20

  • Last modified date

    2021-08-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UI76369 UI76370 UI76371

Modules/Macros

  •    ASMADOPT ASMAINFO ASMAOPT  ASMA00   ASMA01
    ASMA03   ASMA2I   ASMA7DE  ASMA7EN  ASMA7ES  ASMA7JP  ASMA7UE
    ASMA9Z
    

Publications Referenced
SC26494009SC26494108SC26349405  

Fix information

  • Fixed component name

    HLASM MVS, VM &

  • Fixed component ID

    569623400

Applicable component levels

  • R160 PSY UI76370

       UP21/07/22 P F107

  • R360 PSY UI76369

       UP21/07/21 P 2107

  • R689 PSY UI76371

       UP21/07/21 I 1000

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSENW6","label":"High Level Assembler and Toolkit Feature"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"160"}]

Document Information

Modified date:
10 August 2021