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]

Fix for v850 ICE


Hi Guys,

  I ma checking in the patch below to fix an unrecognized insn ICE
  with the v850 port when a simple return insn is generated by some of
  the generic optimizations.

Cheers
  Nick

gcc/ChangeLog
2009-04-23  Nick Clifton  <nickc@redhat.com>

	* config/v850/v850.md (epilogue): Remove suppressed code.
	(return): Rename to return_simple and remove test of frame size.
	* config/v850/v850.c (expand_epilogue): Rename call to gen_return
	to gen_return_simple.

Index: gcc/config/v850/v850.md
===================================================================
--- gcc/config/v850/v850.md	(revision 146634)
+++ gcc/config/v850/v850.md	(working copy)
@@ -1552,18 +1552,13 @@
   ""
   "
 {
-  /* Try to use the trivial return first.  Else use the
-     full epilogue.  */
-  if (0)
-    emit_jump_insn (gen_return ());
-  else
-    expand_epilogue ();
+  expand_epilogue ();
   DONE;
 }")
 
-(define_insn "return"
+(define_insn "return_simple"
   [(return)]
-  "reload_completed && compute_frame_size (get_frame_size (), (long *)0) == 0"
+  "reload_completed"
   "jmp [r31]"
   [(set_attr "length" "2")
    (set_attr "cc" "none")])
Index: gcc/config/v850/v850.c
===================================================================
--- gcc/config/v850/v850.c	(revision 146634)
+++ gcc/config/v850/v850.c	(working copy)
@@ -1931,7 +1931,7 @@
       else if (actual_fsize)
 	emit_jump_insn (gen_return_internal ());
       else
-	emit_jump_insn (gen_return ());
+	emit_jump_insn (gen_return_simple ());
     }
 
   v850_interrupt_cache_p = FALSE;


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