John, I think this is basically the same issue discussed recently about
HLASM being "broken as designed" with respect to TYPECHECK(REGISTER) and
register operands that contain addresses. In my opinion, HLASM should not
require GR32 only for address operands.  Instead it should allow GR, GR32
and GR64.  HLASM has no way of knowing the addressing mode, so why is it
assuming it is not AMODE 64?  Instead, a comment is required in the code to
say that the wrong register type is coded because of HLASM.

David

On Thu, 16 Sep 2010 15:12:20 -0500, McKown, John wrote:
>I think BSM was first introduced with the 31 bit addressing, whatever
machine that was. I don't care and it's not relevant. I don't know why I
even said that.
>
>Anyway, on a z machine, BSM is a way to branch while setting the AMODE from
<whatever> to 24, 31, or 64. Basic logic would be something like:
>
>In the follow IC means the Instruction Counter portion of the PSW.
>
>if branch-to address in second operand is odd then do
>   set amode in PSW to 64 bit
>   copy bits 0..62 of second operand to IC bits 0..62
>   set bit 63 of IC to 0
>   end
>else if bit 32 in second operand is '1'b then do
>   set amode in PSW to 31 bit
>   copy bits 33..63 of the second operand to IC bits 33..63
>   set bits 0..32 of IC to zero.
>   end
>else
>  set amode in PSW to 24 bit
>  copy bits 39..63 of second operand to IC bits 39..63
>  set bits 0..38 of IC to zero
>end
>
>I'm ignoring what happens to the first operand, but basically either bit 63
is set if AMODE(64), else bit 32 is set if AMODE(31), else bit 32 is zeroed
if AMODE(24).
>
>Now, given the above. Why does HLASM think that both operands to the BSM
instruction should be 32 bit registers? My output testing looks like:
>
>
>000003D4 0B0E 665 BSM R0_64,R14_64
>** ASMA323W Symbol R0_64 has incompatible type with general register field
>** ASMA323W Symbol R14_64 has incompatible type with general register field
>** ASMA435I Record 166 in TSH009.SOURCE.ASM(SHOWREGS) on volume: SGLB14
>000003D6 0B0E 666 BSM R0_32,R14_32
>000003D8 0B0E 667 BSM R0,R14
>** ASMA324I Symbol R0 may have incompatible type with general register field
>** ASMA324I Symbol R14 may have incompatible type with general register field
>** ASMA435I Record 168 in TSH009.SOURCE.ASM(SHOWREGS) on volume: SGLB14
>
>My though is that the correct instruction should be:
>
>
>
>    BSM    Rx_32,Ry_64
>
>This is HLASM 6.0, PTF UK54260.
>
>John McKown
>Systems Engineer IV
>IT
>
>Administrative Services Group
>
>HealthMarkets(r)
>
>9151 Boulevard 26 * N. Richland Hills * TX 76010
>(817) 255-3225 phone * (817)-691-6183 cell
>john.mck...@healthmarkets.com * www.HealthMarkets.com
>
>Confidentiality Notice: This e-mail message may contain confidential or
proprietary information. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message. HealthMarkets(r) is the brand name for products underwritten and
issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake
Life Insurance Company(r), Mid-West National Life Insurance Company of
TennesseeSM and The MEGA Life and Health Insurance Company.SM

Reply via email to