[PATCH, GAS/ARM] Allow assembly of IT blocks with AL condition

Richard Earnshaw (lists) Richard.Earnshaw@arm.com
Wed Mar 22 14:44:00 GMT 2017


On 22/03/17 13:54, Prakhar Bahuguna wrote:
> On 22/03/2017 11:44:46, Richard Earnshaw (lists) wrote:
>> It would also be nice to have an error test that shows that 'ite al'
>> generates a suitable diagnostic.
> 
> Noted, I'll add one shortly.
> 
>> Is 'al' mandatory within such a block, or would we accept 'mov	r0, #0'?
>> (I'd be inclined to say we shouldn't, but that could be debated).
> 
> The current behaviour with the patch accepts 'mov	r0, #0' within the IT
> block, as the 'al' suffix is implicit if there isn't a conditional suffix.
> Would it be preferable to explicitly demand the 'al' suffix in this particular
> instance for clarity?
> 

Yes, it will catch cases where you have

ITT AL
MOVAL  ...
MOVAL  ...
MOV    ...

and then remove one of the instructions but forget to update the IT
instruction.

>> What happens when -mimplicit-it=always is on and I write 'moval r0, #0'
>> outside of an explicit IT block?  Do I get a normal instruction, or does
>> it insert an IT instruction before it?
> 
> The behaviour of implicit IT blocks is unaffected, so 'moval' on its own should
> always give the normal instruction as again the 'al' suffix is considered
> implicit if no conditional suffix is specified.
> 
> --
> 
> Prakhar Bahuguna
> 



More information about the Binutils mailing list