From: Nick Clifton <nickc@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: Commit: V850: Fix generation of callt helper functions for interrupt handlers
Date: Tue, 12 Apr 2011 11:33:00 -0000 [thread overview]
Message-ID: <m362qjr9ff.fsf@redhat.com> (raw)
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 ());
reply other threads:[~2011-04-12 11:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m362qjr9ff.fsf@redhat.com \
--to=nickc@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).