MIPS 74K support patch

Joseph S. Myers joseph@codesourcery.com
Mon Apr 16 16:55:00 GMT 2007


On Sat, 14 Apr 2007, Joseph S. Myers wrote:

> On Sat, 14 Apr 2007, David Ung wrote:
> 
> > mul+add.  Although it would probably still be preferable to use madds when
> > optimizing for size.
> 
> Thanks for that point, I can do a follow-up patch to make it use 
> (optimize_size || !TUNE_74K).

And here's that patch.  Tested with cross to mips-linux-gnu with 
-mtune=74kf.  OK to commit?

2007-04-16  Joseph Myers  <joseph@codesourcery.com>

	* config/mips/mips.h (GENERATE_MADD_MSUB): Also enable for 74K if
	optimize_size.

Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h	(revision 123872)
+++ gcc/config/mips/mips.h	(working copy)
@@ -646,7 +646,8 @@
 				 && !TARGET_MIPS16)
 
 /* Integer multiply-accumulate instructions should be generated.  */
-#define GENERATE_MADD_MSUB      (ISA_HAS_MADD_MSUB && !TUNE_74K)
+#define GENERATE_MADD_MSUB      (ISA_HAS_MADD_MSUB			\
+				 && (optimize_size || !TUNE_74K))
 
 /* ISA has floating-point nmadd and nmsub instructions.  */
 #define ISA_HAS_NMADD_NMSUB	((ISA_MIPS4				\

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list