Re: [PATCH i386] PR65753: allow PIC tail calls via function pointers

2015-05-11 Thread Alexander Monakov
On Sun, 10 May 2015, Jan Hubicka wrote: > You probably need to update comment here. I wonder what happens when we > optimize > indirect call to direct call to global function at RTL level? I suppose we are > safe here, because at RTL level we explicitly represent if we refer to PLT > entry > or t

Re: [PATCH i386] PR65753: allow PIC tail calls via function pointers

2015-05-10 Thread Jan Hubicka
> In the i386 backend, tailcalls are incorrectly disallowed in PIC mode for > calls via function pointers on the basis that indirect calls, like direct > calls, would go via PLT and thus require %ebx to point to GOT -- but that is > not true. Quoting Rich Felker who reported the bug, > > "For P

[PATCH i386] PR65753: allow PIC tail calls via function pointers

2015-05-04 Thread Alexander Monakov
In the i386 backend, tailcalls are incorrectly disallowed in PIC mode for calls via function pointers on the basis that indirect calls, like direct calls, would go via PLT and thus require %ebx to point to GOT -- but that is not true. Quoting Rich Felker who reported the bug, "For PLT slots in