public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ralf dot guetlein at web dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/16634] arm-elf-gcc problems when generating code for __attribute__ ((interrupt ("IRQ")))
Date: Thu, 08 Nov 2007 21:42:00 -0000	[thread overview]
Message-ID: <20071108214209.28425.qmail@sourceware.org> (raw)
In-Reply-To: <bug-16634-8979@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from ralf dot guetlein at web dot de  2007-11-08 21:42 -------
(In reply to comment #8)
> also fails on 4.2.1

is this bug still present in 4.2.2?

Acc. to my obervations the error only shows up when not all auto variables can
be mapped to registers, and additional variables are located on stack. As a
work-around, if a more complex interrupt handler is needed, place the code in a
subfunction and call this function from the interrupt handler. In this case no
stack is reserved in the interrupt handler, and the generated code is OK. Care
must be taken, of course, that the optimizer does not inline the code for
IntFunc().

Example:
void IntFunc(void);

__attribute__((interrupt("IRQ")) void IntHandler(void)
{
  IntFunc();
}

__attribute__(noinline)) void IntFunc(void)
{
  // interrupt code here!
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16634


  parent reply	other threads:[~2007-11-08 21:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-16634-8979@http.gcc.gnu.org/bugzilla/>
2006-08-08 23:05 ` pbrook at gcc dot gnu dot org
2006-08-08 23:47 ` pbrook at gcc dot gnu dot org
2006-09-11 10:41 ` rearnsha at gcc dot gnu dot org
2006-09-11 11:31 ` tbm at cyrius dot com
2006-11-14 16:28 ` tla at thrane dot com
2007-01-04  0:10 ` pbrook at gcc dot gnu dot org
2007-05-03  2:14 ` david+gcc at porkrind dot org
2007-08-06  9:08 ` sgh at sgh dot dk
2007-11-08 21:42 ` ralf dot guetlein at web dot de [this message]
2008-02-07 13:55 ` mmz at gmx dot net
2009-02-12 21:58 ` sgh at sgh dot dk
2010-01-09 23:27 ` ramana at gcc dot gnu dot org
2004-07-19 19:27 [Bug c/16634] New: arm-elf-gcc 3.4.0 " bob at cnxtech dot com
2004-10-07 16:14 ` [Bug target/16634] arm-elf-gcc " pinskia at gcc dot gnu dot org
2005-07-02  1:31 ` pinskia at gcc dot gnu dot org

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=20071108214209.28425.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).