Your mind is in the right place, but your text is not.  You can LGF or LLGF
a fullword into a full register.  LG loads a doubleword, whether you point
it at one or not.  i.e. an LG Rx,=X'87654321' results in x'87654321garbage'.

There now exist LGH, LH, LLGH, LLH, LGB, LB, LLGC, and LLC for all
varieties and sizes you need, not to mention the corresponding immediate
versions.

sas

On Thu, Apr 28, 2022 at 6:25 PM Charles Mills <charl...@mcn.org> wrote:

> 64 bits is 64 bits whether the high bit is a sign or part of the number.
> Loading 64 bits into a register loads 64 bits unaltered. The high bit
> becomes the high bit, 0 or 1.
>
> As @Gary says, it only matters when the sending field is smaller than the
> receiving register. (And then only when the sign bit is 1; a negative
> number IOW.)
>
> An LG of X'87654321' into a register gives you FFFFFFFF87654321. An LLG
> gives you 0000000087654321. If the source is X'01234567' then either
> instruction gives you the same result.
>
> LH and LB also do sign extension. ICM and IC do not.
>
> Charles
>
>

Reply via email to