This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: ARM THUMB: fundamental bug in handling of far jumps?


On Mon, Jan 28, 2002 at 04:44:08PM +0100, Adrian von Bidder wrote:
> btw: the far jumps I'm seeing are often in code like this
> 
> 	cmp [something]
> 	b[cond] .LABEL
> 	bl	.SILLY
> .LABEL:	...
> 	...
> 	...		(a few hundred instructions)
> 	...
> .SILLY:	add r2, r3 	(just some random conditional op)
> 	bl	.LABEL
[...]
> Why does gcc emit code like this?

Because it wants to generate

	b[cond] .SILLY
.LABEL
	...
.SILLY
	add r2 r3
	b .LABEL

You can turn off some of this with -fno-reorder-blocks.


r~


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