From e874e49fdf1e637d510c38b8ca031f6843e3c878 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Wed, 29 Aug 2007 09:13:16 +0000 Subject: [PATCH] bfin.opt (minline-plt): Add. * config/bfin/bfin.opt (minline-plt): Add. * config/bfin/bfin.c (bfin_expand_call): Inline PLT when emit call to global functions. * doc/invoke.texi (Option Summary): Mention -minline-plt. (Blackfin Options): Document -minline-plt. From-SVN: r127886 --- gcc/ChangeLog | 8 ++++++++ gcc/config/bfin/bfin.c | 5 ++++- gcc/config/bfin/bfin.opt | 4 ++++ gcc/doc/invoke.texi | 7 ++++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e2f445e77b..49c6defdc06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-08-28 Jie Zhang + + * config/bfin/bfin.opt (minline-plt): Add. + * config/bfin/bfin.c (bfin_expand_call): Inline PLT when emit + call to global functions. + * doc/invoke.texi (Option Summary): Mention -minline-plt. + (Blackfin Options): Document -minline-plt. + 2007-08-28 Nathan Sidwell * config/m68k/m68k.c (m68k_get_function_kind): Assert we're never diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 2d27c3244b6..b34e1306284 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -1880,7 +1880,10 @@ bfin_expand_call (rtx retval, rtx fnaddr, rtx callarg1, rtx cookie, int sibcall) if (TARGET_FDPIC) { if (GET_CODE (callee) != SYMBOL_REF - || bfin_longcall_p (callee, INTVAL (cookie))) + || bfin_longcall_p (callee, INTVAL (cookie)) + || (GET_CODE (callee) == SYMBOL_REF + && !SYMBOL_REF_LOCAL_P (callee) + && TARGET_INLINE_PLT)) { rtx addr = callee; if (! address_operand (addr, Pmode)) diff --git a/gcc/config/bfin/bfin.opt b/gcc/config/bfin/bfin.opt index 2871cbf179b..56d37b54a93 100644 --- a/gcc/config/bfin/bfin.opt +++ b/gcc/config/bfin/bfin.opt @@ -72,6 +72,10 @@ mfdpic Target Report Mask(FDPIC) Enable Function Descriptor PIC mode +minline-plt +Target Report Mask(INLINE_PLT) +Enable inlining of PLT in function calls + mstack-check-l1 Target Report Mask(STACK_CHECK_L1) Do stack checking using bounds in L1 scratch memory diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8279e598301..1c12d207b49 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -450,7 +450,7 @@ Objective-C and Objective-C++ Dialects}. -mstack-check-l1 -mid-shared-library -mno-id-shared-library @gol -mshared-library-id=@var{n} -mleaf-id-shared-library @gol -mno-leaf-id-shared-library -msep-data -mno-sep-data -mlong-calls @gol --mno-long-calls -mfast-fp} +-mno-long-calls -mfast-fp -minline-plt} @emph{CRIS Options} @gccoptlist{-mcpu=@var{cpu} -march=@var{cpu} -mtune=@var{cpu} @gol @@ -8618,6 +8618,11 @@ function calls via function pointers. Link with the fast floating-point library. This library relaxes some of the IEEE floating-point standard's rules for checking inputs against Not-a-Number (NAN), in the interest of performance. + +@item -minline-plt +@opindex minline-plt +Enable inlining of PLT entries in function calls to functions that are +not known to bind locally. It has no effect without @option{-mfdpic}. @end table @node CRIS Options -- 2.30.2