+2015-05-11 Alexander Monakov <amonakov@ispras.ru>
+
+ PR target/65753
+ * config/i386/i386.c (ix86_function_ok_for_sibcall): Allow PIC sibcalls
+ via function pointers.
+
2015-05-11 Alexander Monakov <amonakov@ispras.ru>
* calls.c (prepare_call_address): Transform PLT call to GOT lookup and
rtx a, b;
/* If we are generating position-independent code, we cannot sibcall
- optimize any indirect call, or a direct call to a global function,
- as the PLT requires %ebx be live. (Darwin does not have a PLT.) */
+ optimize direct calls to global functions, as the PLT requires
+ %ebx be live. (Darwin does not have a PLT.) */
if (!TARGET_MACHO
&& !TARGET_64BIT
&& flag_pic
- && (!decl || !targetm.binds_local_p (decl)))
+ && decl && !targetm.binds_local_p (decl))
return false;
/* If we need to align the outgoing stack, then sibcalling would
+2015-05-11 Alexander Monakov <amonakov@ispras.ru>
+
+ PR target/65753
+ * gcc.target/i386/pr65753.c: New test.
+
2015-05-11 Richard Sandiford <richard.sandiford@arm.com>
PR rtl-optimization/66076