aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaurabh Verma <saurabh.verma@codito.com>2005-09-06 22:29:45 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-09-06 15:29:45 -0700
commit3273516f2514845cb4b970b6e3951578082ef4f1 (patch)
tree0797b461233851c9ddc9cf370ada488f2bfaffa6
parent006fa7d4282bf2341c1c0e3162cc2cc70d3706e6 (diff)
downloadgcc-3273516f2514845cb4b970b6e3951578082ef4f1.zip
gcc-3273516f2514845cb4b970b6e3951578082ef4f1.tar.gz
gcc-3273516f2514845cb4b970b6e3951578082ef4f1.tar.bz2
re PR target/8973 ([arc-7-elf] the interupt handler does not return properly, uses j.d insted of j.d.f)
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arc/arc.c9
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 96d6d60..5fae469 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
* config/arc/arc.c (output_shift): Add check for loop count when
optimizing.
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 6d8666e..78a95f4 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -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