re PR target/8973 ([arc-7-elf] the interupt handler does not return properly, uses...
authorSaurabh Verma <saurabh.verma@codito.com>
Tue, 6 Sep 2005 22:29:45 +0000 (22:29 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 6 Sep 2005 22:29:45 +0000 (15:29 -0700)
2005-09-06  Saurabh Verma  <saurabh.verma@codito.com>

        PR target/8973
        * config/arc/arc.c (arc_output_function_epilogue): Update flags while
        returning from an interrupt handler.

From-SVN: r103972

gcc/ChangeLog
gcc/config/arc/arc.c

index 96d6d60c762b2a2f1df418083e0a88794c6a510d..5fae469ddeb20ed9361bf034353f4089baa86844 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-06  Saurabh Verma  <saurabh.verma@codito.com>
+
+       PR target/8973
+       * config/arc/arc.c (arc_output_function_epilogue): Update flags while
+       returning from an interrupt handler.
+
 2005-09-06  Saurabh Verma  <saurabh.verma@codito.com>
 
        PR target/8972
index 6d8666e4c8fdfc083f49ebbb06b6a7229c9c807a..78a95f40ce9f4dedff8a92df0d8f85ba9d063104 100644 (file)
@@ -1362,8 +1362,13 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
        static const int regs[4] = {
          0, RETURN_ADDR_REGNUM, ILINK1_REGNUM, ILINK2_REGNUM
        };
-       fprintf (file, "\tj.d %s\n", reg_names[regs[fn_type]]);
-      }
+
+       /* Update the flags, if returning from an interrupt handler. */
+       if (ARC_INTERRUPT_P (fn_type))
+         fprintf (file, "\tj.d.f %s\n", reg_names[regs[fn_type]]);
+       else
+         fprintf (file, "\tj.d %s\n", reg_names[regs[fn_type]]);
+       }
 
       /* If the only register saved is the return address, we need a
         nop, unless we have an instruction to put into it.  Otherwise