This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: CBZ to the next instruction on ARM


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



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