CBZ to the next instruction on ARM
Nick Clifton
nickc@redhat.com
Thu Mar 22 16:29:00 GMT 2007
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.
Cheers
Nick
More information about the Binutils
mailing list