CBZ to the next instruction on ARM

Mark Shinwell shinwell@codesourcery.com
Thu Mar 22 17:09:00 GMT 2007


Nick Clifton wrote:
> Hi Paul,
> 
>>>> I propose the application of the attached patch that rewrites
>>>> such bogus CBZ instructions to no-ops.  This isn't particularly
>>>> elegant, but does make this robust.  OK?
>>> The patch is OK, but ... is it necessary to actually generate any
>>> instructions at all ?  Wouldn't it be more elegant to just omit
>>> generating an instruction, saving a couple of bytes ?
>>
>> More elegant maybe, but also more surprising. Of course You could 
>> argue that the user has written bogus code, so deserve everything they 
>> get.
>>
>> It's also significantly more complicated to implement. You have to do 
>> insn relaxation rather than simply applying a reloc to a fixed size 
>> instruction.
> 
> Well I didn't say that it would be easier... :-)
> 
> Leaving the patch as-is is OK, but maybe a FIXME could be added so that 
> at some later date relaxation could be implemented.

I'll do that then.

Thanks,
Mark



More information about the Binutils mailing list