------- Comment #11 from ktietz at gcc dot gnu dot org 2009-07-06 16:12 ------- (In reply to comment #10) > > Well, why? For save or called saved registers the functions > > epilogue/prologue > > takes care. The reason why gcc tries to choose ebx for call address register > > here, is exactly this reason, as it can be sure that after the sibcall, the > > register is still valid. > > What's the assembly code generated with your patch? >
Compiling the test case with -O2 .file "c_impfast.c" .text .p2align 4,,15 .globl _f .def _f; .scl 2; .type 32; .endef _f: pushl %ebp movl $2, %ecx movl %esp, %ebp pushl %ebx subl $4, %esp movl __i...@h@4, %ebx call *%ebx addl $4, %esp movl $1, %ecx popl %ebx popl %ebp jmp *%ebx -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38900