Committed.  Fixes issues with the full epilogue not being emitted.

        * config/rl78/rl78.md (return): Rename to rl78_return.
        * config/rl78/rl78.c (rl78_expand_epilogue): Use new name.
        (rl78_expand_eh_epilogue): Use new name.
        (rl78_calculate_death_notes): Likewise.

Index: config/rl78/rl78.md
===================================================================
--- config/rl78/rl78.md (revision 182386)
+++ config/rl78/rl78.md (working copy)
@@ -84,13 +84,13 @@
 (define_expand "sibcall_epilogue"
   [(return)]
   ""
   "FAIL;"
 )
 
-(define_insn "return"
+(define_insn "rl78_return"
   [(return)]
   ""
   "ret"
 )
 
 (define_insn "interrupt_return"
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c  (revision 182386)
+++ config/rl78/rl78.c  (working copy)
@@ -900,21 +900,21 @@ rl78_expand_epilogue (void)
 
   if (is_brk_interrupt_func (cfun->decl))
     emit_jump_insn (gen_brk_interrupt_return ());
   else if (is_interrupt_func (cfun->decl))
     emit_jump_insn (gen_interrupt_return ());
   else
-    emit_jump_insn (gen_return ());
+    emit_jump_insn (gen_rl78_return ());
 }
 
 /* Likewise, for exception handlers.  */
 void
 rl78_expand_eh_epilogue (rtx x ATTRIBUTE_UNUSED)
 {
   /* FIXME - replace this with an indirect jump with stack adjust.  */
-  emit_jump_insn (gen_return ());
+  emit_jump_insn (gen_rl78_return ());
 }
 
 #undef  TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE   rl78_start_function
 
 /* We don't use this to actually emit the function prologue.  We use
@@ -2387,13 +2387,13 @@ rl78_calculate_death_notes (void)
            default:
              break;
            }
          break;
 
        case JUMP_INSN:
-         if (INSN_CODE (insn) == CODE_FOR_return)
+         if (INSN_CODE (insn) == CODE_FOR_rl78_return)
            {
              memset (dead, 1, sizeof (dead));
              /* We expect a USE just prior to this, which will mark
                 the actual return registers.  The USE will have a
                 death note, but we aren't going to be modifying it
                 after this pass.  */

Reply via email to