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 to implement rotates by zero


Paul Koning <pkoning@equallogic.com> writes:
> I think the point is this: it's an across-the-board rule in MIPS that
> 32 bit operands in 64-bit registers MUST be properly sign-extended or
> the result is unpredictable.
>
> There's just one single exception to that, which is sll.

Yeah, I know.  The impression seems to have gathered that I submitted
this patch because I wanted "rol $4,$2,0" to act as a sign extension
instruction.  Not so!

The point is that, at the moment, we generate no instructions at all.
And, when it came to deciding what instruction to use, I thought "sll"
was a better choice than "srl" because in general it is "more defined".
If the consensus is that being "more defined" makes it worse than "srl"
(because it makes ror-by-zero well-defined in circumstances that ror by
non-zero wouldn't be) then I'm happy to use "srl" instead.

Richard


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