Hum. That is a possibility. But why replace 1 instruction with 2?

  RLLG R0,R13,32

vs.

 LR R0,R13
 SLLG R0,32

RLLG is 6 bytes. LR+SLLG is 2+6==8 bytes. So both sequences end up doing
what I want. And, to me, a single 6 byte instruction is "better" than 2
instructions totaling 8 bytes. Admitted, the difference is moot in most
cases. But why not be as efficient as possible, when it is not any harder
to code?

On Wed, Jun 26, 2013 at 10:32 PM, Robert A. Rosenberg <[email protected]>wrote:

> At 21:06 -0500 on 06/26/2013, John McKown wrote about Re: how to:
> document usage of bit(s) of a register.:
>
>
>  But, in this code, I did not care what happened to bits 0-31 of R13 or
>> anything in R0. I could not do the simple LR R0,R13 because I use the
>> lower
>> fullword of R0 later in the code.
>>
>
> So why not LR R0,R13 followed by a SHIFT LEFT GRANDE 32 Bits of R0
> (assuming that there is such a command)?
>



--
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

Reply via email to