This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: CBZ to the next instruction on ARM
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Nick Clifton <nickc at redhat dot com>, Mark Shinwell <shinwell at codesourcery dot com>
- Date: Thu, 22 Mar 2007 16:21:28 +0000
- Subject: Re: CBZ to the next instruction on ARM
- References: <4602A412.6090501@codesourcery.com> <4602A933.9090800@redhat.com>
On Thursday 22 March 2007 16:05, Nick Clifton wrote:
> Hi Mark,
>
> > 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.
Paul