Re: jump after return

2010-11-11 Thread Ian Lance Taylor
Alain Ketterlin writes: > When compiling at -O2 and -O3 optimization, I've found several > instances of routines ending with: > > retq > jmp > > with no branch pointing to the jmp instruction. Is there any specific > reason for such code? Is there a way to avoid this? > > This is gcc 4.4.5, as i

jump after return

2010-11-11 Thread Alain Ketterlin
When compiling at -O2 and -O3 optimization, I've found several instances of routines ending with: retq jmp with no branch pointing to the jmp instruction. Is there any specific reason for such code? Is there a way to avoid this? This is gcc 4.4.5, as installed on Ubuntu 10.10, compiling t