aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Ung <davidu@mips.com>2010-05-03 20:43:19 +0000
committerJim Wilson <wilson@gcc.gnu.org>2010-05-03 13:43:19 -0700
commit67e679795375b25b83c4efd6ef6028ab0f59343c (patch)
tree02a65c73b7cecdd86eda43be32cc1c778ebfc653 /gcc
parent35ad90d5103613ec6a4839bfea1d790ecb671469 (diff)
downloadgcc-67e679795375b25b83c4efd6ef6028ab0f59343c.zip
gcc-67e679795375b25b83c4efd6ef6028ab0f59343c.tar.gz
gcc-67e679795375b25b83c4efd6ef6028ab0f59343c.tar.bz2
mips.c (mips_output_division): When GENERATE_DIVIDE_TRAPS...
* config/mips/mips.c (mips_output_division): When GENERATE_DIVIDE_TRAPS, emit the trap instruction before the divide for TUNE_74K. Co-Authored-By: James E. Wilson <wilson@codesourcery.com> From-SVN: r159004
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 727f897..a3b1c94 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-03 David Ung <davidu@mips.com>
+ James E. Wilson <wilson@codesourcery.com>
+
+ * config/mip/mips.c (mips_output_division): When GENERATE_DIVIDE_TRAPS,
+ emit the trap instruction before the divide for TUNE_74K.
+
2010-05-03 Steven Bosscher <steven@gcc.gnu.org>
* doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove.
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index e246981..345645d 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1,6 +1,6 @@
/* Subroutines used for MIPS code generation.
Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by A. Lichnewsky, lich@inria.inria.fr.
Changes by Michael Meissner, meissner@osf.org.
@@ -11817,10 +11817,17 @@ mips_output_division (const char *division, rtx *operands)
s = "bnez\t%2,1f\n\tbreak\t7\n1:";
}
else if (GENERATE_DIVIDE_TRAPS)
- {
- output_asm_insn (s, operands);
- s = "teq\t%2,%.,7";
- }
+ {
+ /* Avoid long replay penalty on load miss by putting the trap before
+ the divide. */
+ if (TUNE_74K)
+ output_asm_insn ("teq\t%2,%.,7", operands);
+ else
+ {
+ output_asm_insn (s, operands);
+ s = "teq\t%2,%.,7";
+ }
+ }
else
{
output_asm_insn ("%(bne\t%2,%.,1f", operands);