aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2012-01-15 18:47:20 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2012-01-15 18:47:20 +0000
commit62835ceeccafa8e06329a83728e9b0b74be6b65b (patch)
tree72bf56b24a569e365fdbf327b647f39e2d884bc4
parent0d508a19cdec5af8e15622de71d636d147efa9fa (diff)
downloadgcc-62835ceeccafa8e06329a83728e9b0b74be6b65b.zip
gcc-62835ceeccafa8e06329a83728e9b0b74be6b65b.tar.gz
gcc-62835ceeccafa8e06329a83728e9b0b74be6b65b.tar.bz2
mips.c (mips16_build_call_stub): Don't use a stub for calls to locally-binding MIPS16 functions if...
gcc/ * config/mips/mips.c (mips16_build_call_stub): Don't use a stub for calls to locally-binding MIPS16 functions if only the return type uses float regs. From-SVN: r183197
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 66c43f1..67c69aa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * config/mips/mips.c (mips16_build_call_stub): Don't use a stub
+ for calls to locally-binding MIPS16 functions if only the return
+ type uses float regs.
+
2012-01-15 Chung-Lin Tang <cltang@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index b29ec4a..4a64ff2 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -6172,6 +6172,13 @@ mips16_build_call_stub (rtx retval, rtx *fn_ptr, rtx args_size, int fp_code)
if (mips16_stub_function_p (fn))
return NULL_RTX;
+ /* If we're calling a locally-defined MIPS16 function, we know that
+ it will return values in both the "soft-float" and "hard-float"
+ registers. There is no need to use a stub to move the latter
+ to the former. */
+ if (fp_code == 0 && mips16_local_function_p (fn))
+ return NULL_RTX;
+
/* This code will only work for o32 and o64 abis. The other ABI's
require more sophisticated support. */
gcc_assert (TARGET_OLDABI);