This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS gas: 64 bit aware rol/ror macros


cgd@broadcom.com wrote:
[snip]
> > I thought about using drol/dror, but why should someone expect to have
> > a 32 bit "rotate" of a 64 bit register? It looks like the la/dla
> > weirdness.
> 
> oh, that one's easy:
> 
> 	lw	$2, addr
> 	ror	$3, $2, 1
> 
> what is bit 31 of $3?

Hm, rotating an address to a misaligned value? Not the most convincing
exmaple, I assume. :-)

> choices are:
> 
> 	bit 0 of $2
> 
> 	bit 32 of $2, a.k.a. the sign-extension of bit 31 of $2?
> 
> The former is what one would get if one ran the code on a machine w/
> 32-bit registers.  I.e., it allows upward compatibility.  Also, even
> on a 64-bit system it's a useful operation in its own right.

It would be as useful as "rotate half" or "rotate byte".
Ok, dro[lr] helps for compatibility, so I'll change my patch.


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]