This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM THUMB: fundamental bug in handling of far jumps?
On Tue, Jan 29, 2002 at 11:24:25AM +0100, Adrian von Bidder wrote:
> that's clear, as far as it is about jumping around a conditional jump. I
> do not understand why the above would be preferred over
>
> b[!cond] .LABEL
> add r2, r3
> .LABEL:
>
> with the latter having at least one (two, if it's a far
> jump-with-jump-around-the-conditional)
Not-taken branches are normally better for performance. Might not
apply to the thumb though.
> > You can turn off some of this with -fno-reorder-blocks.
>
> I see. Is this option documented?
Apparently not. I would have said it was. I'll try to get to
that this afternoon.
> With all this: any hints to were I would disable the use of lr as a
> scratch register? I'd guess it's in arm.h, but it wasn't obvious enough
> for me on a first look. (I don't understand enough gcc internals to
> change handling of far jumps to record the fact that lr is overwritten.)
I could tell you how to turn it off (modifying FIXED_REGS), but
I don't know enough about the arm or thumb to say if that would
get you into trouble because of something else.
r~