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:
> OK I have done that.  (Patch below).  Incidentally this whole topic
> started because on of customer had complained that GAS did not behave
> in the same way as ARM's assembler.  (Apparently ARM's assembelr
> rejects shifts of zero, rather than converting them into LSLs.)


So make it an as_warn, rather than an as_tsktsk.  Then the user can add -X 
to the assembly and will get an error.


nickc@redhat.com said:
! 	  if (num == 0)
! 	    {
! 	      as_tsktsk (_("Shift of 0 ignored."));
! >>>	      shift = shift_names;
! 	      assert (shift->properties->index == SHIFT_LSL);
! 	    }

On a point of style, I find assigning the "whole array" here confusing.  
It would be much clearer if this read

	shift = &shift_names[0];




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