]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR target/7042
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Jun 2002 18:54:43 +0000 (18:54 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Jun 2002 18:54:43 +0000 (18:54 +0000)
* reorg.c (make_return_insns) [DELAY_SLOTS_FOR_EPILOGUE]: Exit
early if current_function_epilogue_delay_list is non-empty.
* config/cris/cris.md ("return"): Add sanity check asserting that
current_function_epilogue_delay_list is empty.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54668 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/cris/cris.md
gcc/reorg.c

index e648f376895cd3487797111d03a2279ec9e03daa..eaa6d067c81e548cf92d93da2f295c031946b50b 100644 (file)
@@ -1,3 +1,11 @@
+2002-06-16  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR target/7042
+       * reorg.c (make_return_insns) [DELAY_SLOTS_FOR_EPILOGUE]: Exit
+       early if current_function_epilogue_delay_list is non-empty.
+       * config/cris/cris.md ("return"): Add sanity check asserting that
+       current_function_epilogue_delay_list is empty.
+
 2002-06-16  Jeff Law <law@redhat.com>
 
        * toplev.c (rest_of_compilation): Perform a simpler, less costly
index 1e611342e6b2f6b91a5217cd784bba1f03a3ade8..c92ec7fd2a4e70a604f25a913dd46a4dc63332d6 100644 (file)
   /* Just needs to hold a 'movem [sp+],rN'.  */
   char rd[sizeof (\"movem [$sp+],$r99\")];
 
+  /* Try to avoid reorg.c surprises; avoid emitting invalid code, prefer
+     crashing.  This test would have avoided invalid code for target/7042.  */
+  if (current_function_epilogue_delay_list != NULL)
+    abort ();
+
   *rd = 0;
 
   /* Start from the last call-saved register.  We know that we have a
index 3e3052dff9d09674a278af01621dfe2755a203d4..2ccde4fdf36fa6d77e3135688cb0a7acbf295a6c 100644 (file)
@@ -3485,6 +3485,17 @@ make_return_insns (first)
   rtx real_return_label = end_of_function_label;
   int slots, i;
 
+#ifdef DELAY_SLOTS_FOR_EPILOGUE
+  /* If a previous pass filled delay slots in the epilogue, things get a
+     bit more complicated, as those filler insns would generally (without
+     data flow analysis) have to be executed after any existing branch
+     delay slot filler insns.  It is also unknown whether such a
+     transformation would actually be profitable.  Note that the existing
+     code only cares for branches with (some) filled delay slots.  */
+  if (current_function_epilogue_delay_list != NULL)
+    return;
+#endif
+
   /* See if there is a RETURN insn in the function other than the one we
      made for END_OF_FUNCTION_LABEL.  If so, set up anything we can't change
      into a RETURN to jump to it.  */