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 2/30] Remove mips.c dependencies on target hook macros


This patch just removes mips.c dependencies on target hook macros,
so that the next patch can put them at the end.

The TARGET_HAVE_TLS test is redundant, and will be true for the vast
majority of users, given that binutils support for MIPS TLS is quite
old now.  min_anchor_offset and max_anchor_offset are only used after
OVERRIDE_OPTIONS, so there's no need to initialise them statically.

Richard


gcc/
	* config/mips/mips.c (TARGET_MIN_ANCHOR_OFFSET): Delete.
	(TARGET_MAX_ANCHOR_OFFSET): Delete.
	(mips_cannot_force_const_mem): Don't check TARGET_HAVE_TLS.
	(mips_set_mips16_mode): Initialize min_anchor_offset and
	max_anchor_offset directly to constants.

Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2007-10-18 18:12:57.000000000 +0100
+++ gcc/config/mips/mips.c	2007-10-18 18:15:15.000000000 +0100
@@ -1370,10 +1370,6 @@ #define TARGET_FUNCTION_ATTRIBUTE_INLINA
 #undef TARGET_EXTRA_LIVE_ON_ENTRY
 #define TARGET_EXTRA_LIVE_ON_ENTRY mips_extra_live_on_entry
 
-#undef TARGET_MIN_ANCHOR_OFFSET
-#define TARGET_MIN_ANCHOR_OFFSET -32768
-#undef TARGET_MAX_ANCHOR_OFFSET
-#define TARGET_MAX_ANCHOR_OFFSET 32767
 #undef TARGET_USE_BLOCKS_FOR_CONSTANT_P
 #define TARGET_USE_BLOCKS_FOR_CONSTANT_P mips_use_blocks_for_constant_p
 #undef TARGET_USE_ANCHORS_FOR_SYMBOL_P
@@ -1865,7 +1861,7 @@ mips_cannot_force_const_mem (rtx x)
 	return true;
     }
 
-  if (TARGET_HAVE_TLS && for_each_rtx (&x, &mips_tls_symbol_ref_1, 0))
+  if (for_each_rtx (&x, &mips_tls_symbol_ref_1, 0))
     return true;
 
   return false;
@@ -5715,8 +5711,8 @@ mips_set_mips16_mode (int mips16_p)
 	    align_functions = 8;
 	}
 
-      targetm.min_anchor_offset = TARGET_MIN_ANCHOR_OFFSET;
-      targetm.max_anchor_offset = TARGET_MAX_ANCHOR_OFFSET;
+      targetm.min_anchor_offset = -32768;
+      targetm.max_anchor_offset = 32767;
     }
 
   /* (Re)initialize mips target internals for new ISA.  */


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