[PATCH] MIPS gas: Support for drol/dror macros (was: Re: [PATCH] MIPS gas: 64 bit aware rol/ror macros)

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Sun May 19 10:55:00 GMT 2002


Paul Koning wrote:
> Excerpt of message (sent 15 May 2002) by Thiemo Seufer:
> > Eric Christopher wrote:
> > > Do we need yet another macro instruction?
> > 
> > Probably the compiler will never use any rotate macro, but it's useful
> > for assembler programmers creating e.g. efficient cryptography routines.
> 
> I doubt that.  One of the hassles for assembly language programming on
> MIPS is the constant struggle to remember what's a real instruction
> and what's a macro.

.set nomacro is good for this.

> If you code in assembler for very low level stuff
> (bootstraps etc.) that doesn't matter.  If you're coding for ultimate
> efficiency, it matters a whole lot.  I certainly would not use a ROTx
> macro for the rotates in crypto, because I would want to schedule the
> code myself, and the macros only get in the way when you do that.

So, basically you are saying all assembler macros are very much useless.
Given the amount of of existing macros in MIPS assemblers, many people
will disagree.

At the very least, the IRIX as has drol/dror, which (surprise :-)
behaves exactly the same way than my implementation. If rol/ror
macros were useful enough for inclusion, the drol/dror counterparts
should be included, too.


Thiemo



More information about the Binutils mailing list