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]

Re: GAS for ARM: Reject ASR/LSR/ROR with immediate of 0



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.


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