Slowdowns in code generated by GCC>=3.3

Földy Lajos foldy@rmki.kfki.hu
Wed Oct 20 18:41:00 GMT 2004


On Wed, 20 Oct 2004, Zack Weinberg wrote:

> Földy Lajos <foldy@rmki.kfki.hu> writes:
> 
> > not portable, but on i386 you can try using the good old inline assembly: 
> >
> > 	void* pc;
> > 	...
> > 	pc=&&lab;
> > 	__asm__("jmp *%0" : : "a" (pc));
> > 	...
> > 	lab:
> 
> No, you can't do this.  Asm statements cannot alter control flow.
> 
> zw
> 


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;

regards,
lajos



More information about the Gcc mailing list