mips.c (mips_function_ok_for_sibcall): Use targetm.binds_local_p instead of DECL_EXTE...
authorRichard Sandiford <rsandifo@nildram.co.uk>
Thu, 6 Dec 2007 17:48:43 +0000 (17:48 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 6 Dec 2007 17:48:43 +0000 (17:48 +0000)
gcc/
* config/mips/mips.c (mips_function_ok_for_sibcall): Use
targetm.binds_local_p instead of DECL_EXTERNAL.

From-SVN: r130653

gcc/ChangeLog
gcc/config/mips/mips.c

index 7994797e19ffb7239f52dae13bbc4fb4626c3fb4..4a99f2d70f432767254f4c2c829529f3ed7f4f9d 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-06  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * config/mips/mips.c (mips_function_ok_for_sibcall): Use
+       targetm.binds_local_p instead of DECL_EXTERNAL.
+
 2007-12-06  Harsha Jagasia <harsha.jagasia@amd.com>
 
        * tree-vectorizer.c (slpeel_add_loop_guard): Gimplify the condition.
index 42e15a0320cf53e8e9215918191aa2bc70396db3..125f08714783b6298f378c4c410edf5b56bb3791 100644 (file)
@@ -5611,12 +5611,12 @@ mips_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
       && const_call_insn_operand (XEXP (DECL_RTL (decl), 0), VOIDmode))
     return false;
 
-  /* When -minterlink-mips16 is in effect, assume that external
-     functions could be MIPS16 ones unless an attribute explicitly
-     tells us otherwise.  */
+  /* When -minterlink-mips16 is in effect, assume that non-locally-binding
+     functions could be MIPS16 ones unless an attribute explicitly tells
+     us otherwise.  */
   if (TARGET_INTERLINK_MIPS16
       && decl
-      && DECL_EXTERNAL (decl)
+      && !targetm.binds_local_p (decl)
       && !mips_nomips16_decl_p (decl)
       && const_call_insn_operand (XEXP (DECL_RTL (decl), 0), VOIDmode))
     return false;