GAS for ARM: Reject ASR/LSR/ROR with immediate of 0
Richard Earnshaw
rearnsha@arm.com
Thu Aug 17 02:31:00 GMT 2000
nickc@redhat.com said:
> Agreed. In fact I decided to tidy up that whole code area (see the
> patch below). One thing I did add was a warning message if "ROR #0"
> is used, since this is turned into RRX, which may not have been what
> the programmer was expecting.
> If anyone has any problems with this patch (which I am about to check
> in), please let me know.
This is great except for converting ror #0 into rrx. That is just plain
wrong.
In the past we converted any shift or rotate of 0 into asl #0 (which is
the encoding of no shift at all); while it might be considered dubious,
it was basically the same operation as was requested. But ror #0 is
definitely not the same as rrx.
I think we should continue to convert any shift or rotate of 0 into "asl
#0"; though perhaps we should emit a warning that that is what is being
done.
Richard.
More information about the Binutils
mailing list