* Commit: V850: Fix generation of callt helper functions for interrupt handlers
@ 2011-04-12 11:33 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2011-04-12 11:33 UTC (permalink / raw)
To: gcc-patches
Hi Guys,
I am applying the patch below to the 4.6 branch and mainline sources.
It fixes a problem with the V850 backend where it would generate a
CALLT instruction for a V850 variant which does not support it, when
gcc was compiling an interrupt handler.
Cheers
Nick
gcc/ChangeLog
2011-04-12 Nick Clifton <nickc@redhat.com>
* config/v850/v850.c (expand_prologue): Do not use the CALLT
instruction for interrupt handlers if the target is the basic V850
architecture.
(expand_epilogue): Likewise.
Index: gcc/config/v850/v850.c
===================================================================
--- gcc/config/v850/v850.c (revision 172300)
+++ gcc/config/v850/v850.c (working copy)
@@ -1686,7 +1686,7 @@
/* Save/setup global registers for interrupt functions right now. */
if (interrupt_handler)
{
- if (! TARGET_DISABLE_CALLT)
+ if (! TARGET_DISABLE_CALLT && (TARGET_V850E || TARGET_V850E2_ALL))
emit_insn (gen_callt_save_interrupt ());
else
emit_insn (gen_save_interrupt ());
@@ -1768,7 +1768,7 @@
/* Special case interrupt functions that save all registers for a call. */
if (interrupt_handler && ((1L << LINK_POINTER_REGNUM) & reg_saved) != 0)
{
- if (! TARGET_DISABLE_CALLT)
+ if (! TARGET_DISABLE_CALLT && (TARGET_V850E || TARGET_V850E2_ALL))
emit_insn (gen_callt_save_all_interrupt ());
else
emit_insn (gen_save_all_interrupt ());
@@ -2019,7 +2019,7 @@
/* And return or use reti for interrupt handlers. */
if (interrupt_handler)
{
- if (! TARGET_DISABLE_CALLT)
+ if (! TARGET_DISABLE_CALLT && (TARGET_V850E || TARGET_V850E2_ALL))
emit_insn (gen_callt_return_interrupt ());
else
emit_jump_insn (gen_return_interrupt ());
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-12 11:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 11:33 Commit: V850: Fix generation of callt helper functions for interrupt handlers Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).