]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac (mipsisa*-*-elfoabi*): New stanza.
authorRichard Sandiford <rsandifo@nildram.co.uk>
Thu, 20 Sep 2007 20:01:34 +0000 (20:01 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 20 Sep 2007 20:01:34 +0000 (20:01 +0000)
* configure.ac (mipsisa*-*-elfoabi*): New stanza.
* configure: Regenerate.

config/
* mt-mips-elfoabi: New file.

gcc/
* doc/invoke.texi (-minterlink-mips16): Document.
* config/mips/mips.opt (minterlink-mips16): New option.
* config/mips/mips.c (mips_function_ok_for_sibcall): Handle
-minterlink-mips16

From-SVN: r128625

ChangeLog
config/ChangeLog
config/mt-mips-elfoabi [new file with mode: 0644]
configure
configure.ac
gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/mips/mips.opt
gcc/doc/invoke.texi

index e57e59df468d6945dd5361ff6d17e500ed39f78a..a3a0df8e12d1762fc6dfb5415c05b3afd852525c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-20  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * configure.ac (mipsisa*-*-elfoabi*): New stanza.
+       * configure: Regenerate.
+
 2007-09-20  Paul Jarc  <prj-bugzilla-gcc@multivac.cwru.edu>
 
        PR bootstrap/31906
index faf4d3c871bbb2c6acc27abfa1325785718bfdca..868e0e86aad3b97406e8214b545206f84c47fc08 100644 (file)
@@ -1,3 +1,7 @@
+2007-09-20  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * mt-mips-elfoabi: New file.
+
 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
 
        * mt-sde (CFLAGS_FOR_TARGET): Add -mno-gpopt.
diff --git a/config/mt-mips-elfoabi b/config/mt-mips-elfoabi
new file mode 100644 (file)
index 0000000..49c8ecd
--- /dev/null
@@ -0,0 +1,6 @@
+# The *-elfoabi configurations are intended to be usable for both
+# MIPS16 and non-MIPS16 code, but the libraries are all non-MIPS16.
+# Add -minterlink-mips16 so that the libraries can be used with both
+# ISA modes.
+CFLAGS_FOR_TARGET = -minterlink-mips16
+CXXFLAGS_FOR_TARGET = -minterlink-mips16
index 4e7747df4a76deb52a8784b36e661ad86bcf9434..eca027f19e3dada63009c68e290f7ed09fabbcec 100755 (executable)
--- a/configure
+++ b/configure
@@ -5279,6 +5279,9 @@ case "${target}" in
   mips*-sde-elf*)
     target_makefile_frag="config/mt-sde"
     ;;
+  mipsisa*-*-elfoabi*)
+    target_makefile_frag="config/mt-mips-elfoabi"
+    ;;
   *-*-netware*)
     target_makefile_frag="config/mt-netware"
     ;;
index 6e490fc3f470799f2d64d1a26166831512e5fcdf..1496347d86ab4cfee52d2890ef3926758b10c730 100644 (file)
@@ -1798,6 +1798,9 @@ case "${target}" in
   mips*-sde-elf*)
     target_makefile_frag="config/mt-sde"
     ;;
+  mipsisa*-*-elfoabi*)
+    target_makefile_frag="config/mt-mips-elfoabi"
+    ;;
   *-*-netware*)
     target_makefile_frag="config/mt-netware"
     ;;
index a3854f34ea6d84b80c82d39e9c71dbc6989c0729..72df51a9fdf8be6ffb7b42c5d8f804bb1d2f098f 100644 (file)
@@ -1,3 +1,10 @@
+2007-09-20  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * doc/invoke.texi (-minterlink-mips16): Document.
+       * config/mips/mips.opt (minterlink-mips16): New option.
+       * config/mips/mips.c (mips_function_ok_for_sibcall): Handle
+       -minterlink-mips16
+
 2007-09-20  Joseph Myers  <joseph@codesourcery.com>
 
        * doc/extend.texi (Attribute Syntax): Remove old speculative
index 7f959f41a21859b5b52cb61e3153ab60dfbc1551..f2c8ba9fb83648bbebe20638dbcbed8272ef8441 100644 (file)
@@ -4256,6 +4256,17 @@ mips_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
   if (mips_use_mips16_mode_p (decl))
     return false;
 
+  /* ...and when -minterlink-mips16 is in effect, assume that external
+     functions could be MIPS16 ones unless an attribute explicitly
+     tells us otherwise.  We only care about cases where the sibling
+     and normal calls would both be direct.  */
+  if (TARGET_INTERLINK_MIPS16
+      && decl
+      && DECL_EXTERNAL (decl)
+      && !mips_nomips16_decl_p (decl)
+      && const_call_insn_operand (XEXP (DECL_RTL (decl), 0), VOIDmode))
+    return false;
+
   /* Otherwise OK.  */
   return true;
 }
index bbbc305e39a9d98c4173e9e6c7739d22fffdd66c..05aedda1428ba7e2045abd4909cd435cc2ba6e0d 100644 (file)
@@ -164,6 +164,10 @@ mhard-float
 Target Report RejectNegative InverseMask(SOFT_FLOAT_ABI, HARD_FLOAT_ABI)
 Allow the use of hardware floating-point ABI and instructions
 
+minterlink-mips16
+Target Report Var(TARGET_INTERLINK_MIPS16) Init(0)
+Generate code that can be safely linked with MIPS16 code.
+
 mips
 Target RejectNegative Joined
 -mipsN Generate code for ISA level N
index ddd95a493d9f4a76bb32c917619ac44a18e74d86..7f85b7e705bcb1f049bfd07c2bff78a08fc237c0 100644 (file)
@@ -623,6 +623,7 @@ Objective-C and Objective-C++ Dialects}.
 @gccoptlist{-EL  -EB  -march=@var{arch}  -mtune=@var{arch} @gol
 -mips1  -mips2  -mips3  -mips4  -mips32  -mips32r2  -mips64 @gol
 -mips16  -mno-mips16  -mflip-mips16 @gol
+-minterlink-mips16  -mno-interlink-mips16 @gol
 -mabi=@var{abi}  -mabicalls  -mno-abicalls @gol
 -mshared  -mno-shared  -mxgot  -mno-xgot  -mgp32  -mgp64 @gol
 -mfp32  -mfp64  -mhard-float  -msoft-float @gol
@@ -11684,6 +11685,18 @@ Generate MIPS16 code on alternating functions.  This option is provided
 for regression testing of mixed MIPS16/non-MIPS16 code generation, and is
 not intended for ordinary use in compiling user code.
 
+@item -minterlink-mips16
+@itemx -mno-interlink-mips16
+@opindex minterlink-mips16
+@opindex mno-interlink-mips16
+Require (do not require) that non-MIPS16 code be link-compatible with
+MIPS16 code.
+
+For example, non-MIPS16 code cannot jump directly to MIPS16 code;
+it must either use a call or an indirect jump.  @option{-minterlink-mips16}
+therefore disables direct jumps unless GCC knows that the target of the
+jump is not MIPS16.
+
 @item -mabi=32
 @itemx -mabi=o64
 @itemx -mabi=n32