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


At 19 Aug 2002 15:27:23 +0100, Richard Sandiford wrote:
> 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.

I suggest 'srl' -- we have no reason to believe that if rotate is
defined as a 'standard' instruction, it will behave like sll (i.e. OK
w/ not-sign-extended values) rather than like srl (UNPREDICTABLE on
sign-extended values).

Since the sim will check do not-sign-extended value UNPREDICTABLE
checking for mips32 and mips64, the srl expansion will generate
UNPREDICTABLE on not-sign-extended inputs.

I think that's desirable: help people kill bugs.



chris


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