Patch to implement rotates by zero
Mon Aug 19 06:52:00 GMT 2002
>>>>> "Richard" == Richard Sandiford <firstname.lastname@example.org> writes:
Richard> Hmm, having had a bit more chance to think about it, I'd
Richard> like to stick with the original patch...
Richard> email@example.com writes:
>> it just makes the binutils code simpler. People who do rotate by
>> 0 and expect an optimization should lose. it wouldn't happen if
>> they had real rotate instructions (i.e., they'd get an actual
>> instruction). So, they might as well get the 'normal' rotate
>> macro expansion.
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. It seems
that this special exception was created to shorten the common code
which you will see all over the place when compilers are making sure
that 32-bit operands are properly formed.
It seems logical for a macro to obey the standard data format rule,
which is that 32-bit data must be properly sign-extended in 64 bit
More information about the Binutils