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: Slowdowns in code generated by GCC>=3.3


On Wed, 20 Oct 2004, Zack Weinberg wrote:

> Földy Lajos <foldy@rmki.kfki.hu> writes:
> 
> > and what about adding the real goto (which will be never executed, but
> > gcc will have "almost real" control flow):
> >
> >  	__asm__("jmp *%0" : : "a" (pc));
> > 	goto *pc;
> 
> Nothing stops GCC from folding that asm into the common-ized jump
> block.
> 
> zw
> 

I see.

So the practical solution is 

- generate asm listing
- identify appropriate jumps, eg:

        ...
        movl    8(%ecx), %eax
        jmp     .Lxxxxx
	...
.Lxxxxx:
        jmp     *%eax

- change "jmp .Lxxxxx" to "jmp *%eax" with your favorite text editor
- compile the asm source

:-)


Is there a chance, that the patch for PR15242 (if available) will go into 
3.4.3?

regards,
lajos


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