Patch to implement rotates by zero
Mon Aug 19 07:37:00 GMT 2002

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.


More information about the Binutils mailing list