We have just shipped the PTFs for HLASM APAR PH38969 which adds
ways to temporarily modify certain assembly-time checks for
additional flexibility.
For details, see:
https://www.ibm.com/support/pages/apar/PH38969
One can now use ACONTROL with FLAG(NORENT) to temporarily
suppress reentrant checks, as discussed on this list in December
2019. The default is FLAG(RENT), for obvious compatibility
reasons.
The checks on immediate operand values for TYPECHECK(MAGNITUDE)
have now been extended to cover unsigned immediate operands of
8 or more bits as well. Unsigned immediate operand values were
previously always strictly checked, with an error-level message
if the value is out of range. The check is now done in the same
way as for signed immediate operands, normally producing a
warning message if the result is out of the valid range, but
with the option to suppress the magnitude check. When the value
is out of range the relevant number of low-order bits are used.
The valid range for the TYPECHECK(MAGNITUDE) check normally
depends on whether the field is signed or not, but this can be
modified using the new option TYPECHECK(SIGNED|NOSIGNED). The
default TYPECHECK(SIGNED) uses the existing rule, only allowing
the signed range of values for a signed field and the unsigned
range of values for an unsigned field. TYPECHECK(NOSIGNED)
suppresses this check, tolerating a value if it either fits
within the signed or unsigned range for the size of field.
With TYPECHECK(NOSIGNED), cases such as the following are
accepted without a warning:
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. Remember that every operand value
is initially evaluated as a 31-bit signed expression, regardless
of the size of the relevant instruction field.
We therefore do not recommend using TYPECHECK(NOSIGNED) except
temporarily (preferably using ACONTROL) when there is a strong
justification, for example when signed symbolic values are
defined which need to be stored in 1-byte fields, using the
instruction MVI which normally expects unsigned values.
The new TYPECHECK processing provides similar flexibility for
immediate operands to that provided by the options FLAG(TRUNC)
and FLAG(SIGNED) for DC constants.
Jonathan Scott, HLASM
IBM Hursley, UK