Re: [PATCH] ppc32 use simplified mmenonics

Albert Cahalan
2004-08-22T17:03:07Z

On Sun, 2004-08-22 at 12:28, Vincent Hanquez wrote:

> However each person that has read some documentations about ppc assembly know
> that a 'clrrwi' is a macro to a more complex instruction 'rlwinm'.
>
> Any documentation that wouldn't mention that is just plain wrong.

It's buried in Appendix F.

> > OK, that's 8. Dividing 456 by that, I still see a 57:1 ratio.
> >
> > There's also that matter of the 1848 operations you can't
> > access via the "simplified" instruction names.
>
> Are you counting one operations for 'rlwinm' and one for 'rlwinm.' to have
> so much (1848) operations ? or is your figures totally random ?

That's just for branches.

There are 32 condition register bits.
There are 9 values for the BO field. (so far)
There are 8 of these: bc,bca,bcl,bcla,bcctr,bcctrl,bclr,bclrl

That comes to 2304. Subtract the 456 "simplified"
instruction names you have. That leaves 1848 that
you are unable to access.

Take a look at the crand instruction. It uses numbers.
Now, just imagine mixing that with branch instructions
that hide the numbers. I hope you see the problem.

> But anyway it seems, we could discuss the benefit or not, of using simplified
> instructions the whole night. I think this is a good idea (obviously) and it
> seems Benjamin thinks it too. Thoses simplified instructions are mentioned in
> all officials ppc assembly documentation because they are simple and help.

It doesn't appear to be so. He wrote:

: Oh well.. I've got quite used to tweaking rlwinm directly
: but I suppose it's more clear for others to go to clrrwi.

So I'd like him to know that others like rlwinm directly too.
Using instructions that are in the index makes sense.
Using a zillion poorly documented alternatives is madness.