This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MIPS 23/30] Add ISA_HAS_LDC1_SDC1


This trivial patch just adds a ISA_HAS_LDC1_SDC1 macro, to replace
a direct mips_isa check.

Richard


gcc/
	* config/mips/mips.h (ISA_HAS_LDC1_SDC1): New macro.
	* config/mips/mips.c (mips_split_64bit_move_p): Use ISA_HAS_LDC1_SDC1
	instead of checking mips_isa.

Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h	2007-10-18 11:07:14.000000000 +0100
+++ gcc/config/mips/mips.h	2007-10-18 11:07:15.000000000 +0100
@@ -735,6 +735,9 @@ #define ISA_HAS_CONDMOVE	((ISA_MIPS4				
 				 && !TARGET_MIPS5500			\
 				 && !TARGET_MIPS16)
 
+/* ISA has LDC1 and SDC1.  */
+#define ISA_HAS_LDC1_SDC1	(!ISA_MIPS1 && !TARGET_MIPS16)
+
 /* ISA has the mips4 FP condition code instructions: FP-compare to CC,
    branch on CC, and move (both FP and non-FP) on CC.  */
 #define ISA_HAS_8CC		(ISA_MIPS4				\
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2007-10-18 11:07:14.000000000 +0100
+++ gcc/config/mips/mips.c	2007-10-18 11:07:15.000000000 +0100
@@ -3495,9 +3495,8 @@ mips_split_64bit_move_p (rtx dest, rtx s
   if (FP_REG_RTX_P (src) && FP_REG_RTX_P (dest))
     return false;
 
-  /* Check for floating-point loads and stores.  They can be done using
-     ldc1 and sdc1 on MIPS II and above.  */
-  if (mips_isa > 1)
+  /* Check for floating-point loads and stores.  */
+  if (ISA_HAS_LDC1_SDC1)
     {
       if (FP_REG_RTX_P (dest) && MEM_P (src))
 	return false;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]