This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Blackfin: use long calls for weak symbols
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jie Zhang <jzhang918 at gmail dot com>
- Date: Mon, 14 Sep 2009 13:15:13 +0100
- Subject: Blackfin: use long calls for weak symbols
I've committed this patch which makes the Blackfin port generate long
calls (indirect ones) for weak symbols, since they may resolve to null
which may not be in range for a normal call insn.
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
Index: ChangeLog
===================================================================
--- ChangeLog (revision 151684)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2009-09-14 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.c (bfin_longcall_p): Don't use short calls for weak
+ symbols.
+
2009-09-14 Richard Guenther <rguenther@suse.de>
PR middle-end/41350
Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c (revision 151634)
+++ config/bfin/bfin.c (working copy)
@@ -2219,6 +2219,8 @@ bool
bfin_longcall_p (rtx op, int call_cookie)
{
gcc_assert (GET_CODE (op) == SYMBOL_REF);
+ if (SYMBOL_REF_WEAK (op))
+ return 1;
if (call_cookie & CALL_SHORT)
return 0;
if (call_cookie & CALL_LONG)