On Fri, 15 Apr 2022 at 03:06, Ian Worthington
<00000c9b78d54aea-dmarc-requ...@listserv.uga.edu> wrote:
>
> Thanks Seymour, it had never occurred to me they were totally identical apart 
> from CC and sign extension.  I'd always had a suspicion that there might be 
> something that happened at the boundaries that I hadn't considered!
> Good to know.

This is also true of some related things in the architecure. I spent
an embarassingly long time some years back wondering why there were
only Rotate Left versions of instructions like RLL/RLLG and the set of
Rotate Then x Selected Bits. Of course it's obvious that if you want
to rotate right, say 5 bits, you can instead rotate left 59 bits (or
37 for a 32-bit register). What I wasn't seeing right away is that you
can specify -5 as the rotate left amount on the instruction (immediate
field for RSxBG or in a register and/or displacement for RLL[G]), and
the truncation of the resulting twos complement representation of -5
is, duh, 59. Or 37, if you like.

Tony H.

Reply via email to