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]

[ColdFire 44/63] Remove unncessary saves and restores of %a5


As mentioned previously, there is code to make sure that the PIC
register is always saved and restored by nonleaf functions if
TARGET_ID_SHARED_LIBRARY.  This special case is no longer needed
because the GOT loads have been separated out from the call patterns.

Richard


gcc/
	* config/m68k/m68k.c (m68k_save_reg): Remove special case for
	leaf functions.
	(m68k_expand_prologue): Likewise.

Index: gcc/config/m68k/m68k.c
===================================================================
--- gcc/config/m68k/m68k.c	2007-01-09 15:02:19.000000000 +0000
+++ gcc/config/m68k/m68k.c	2007-01-09 15:02:20.000000000 +0000
@@ -749,8 +749,6 @@ m68k_save_reg (unsigned int regno, bool 
     {
       if (current_function_uses_pic_offset_table)
 	return true;
-      if (!current_function_is_leaf && TARGET_ID_SHARED_LIBRARY)
-	return true;
     }
 
   if (current_function_calls_eh_return)
@@ -996,8 +994,7 @@ m68k_expand_prologue (void)
 
   if (flag_pic
       && !TARGET_SEP_DATA
-      && (current_function_uses_pic_offset_table
-	  || (!current_function_is_leaf && TARGET_ID_SHARED_LIBRARY)))
+      && current_function_uses_pic_offset_table)
     {
       insn = emit_insn (gen_load_got (pic_offset_table_rtx));
       REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,


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