On Mon, 2012-06-18 at 11:24 +1000, Robin Vowels wrote:
> From: "Watkins, Douglas" <[email protected]>
> Sent: Wednesday, 6 June 2012 11:28 PM
>
>
> > Here's one way to do standard EXecute without a base register:
> >
> >         AHI   R2,-1               Minus 1 for EX
>
> BTW,
>     BCTR 2,0 will do a better job.

I agree. It is two bytes shorter. Possibly faster. Does not disturb the
condition code. And is a generally understood standard notation. Might
even be considered like the DECrement instruction in other assemblers.

As an aside, I was actually (foolishly) considering making macros called
DEC (as in DEC Reg,Value => AHI Reg,0-&Value with default of 1), INC
(INC Reg,Value => AHI Reg,Value, default of 1), PRED Reg (DEC Reg,1),
SUCC Reg (INC Reg). Then realized it would likely be more confusing than
helpful.

--
John McKown
Maranatha! <><

Reply via email to